Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Position of cloth in world space
#1
Hello,
I am unable to get any information about position of my cloth. In my project the cloth is flying through space and is followed by camera. I started using obi and cant find the info about position anywhere. I dont need exact position. Rough estimate of cloths center would be great. Any ideas how?
Reply
#2
(21-02-2018, 01:04 PM)domkonecny Wrote: Hello,
I am unable to get any information about position of my cloth. In my project the cloth is flying through space and is followed by camera. I started using obi and cant find the info about position anywhere. I dont need exact position. Rough estimate of cloths center would be great. Any ideas how?

Hi there,

If your cloth is not attached to any transform and is just floating around freely, then you will have to estimate its position by averaging the particle's positions. There's a sample snippet in the documentation that does exactly this:

http://obi.virtualmethodstudio.com/tutor...icles.html

It is the "ActorCOM" component (COM stands for Center Of Mass). You will want to modify it slightly so that the "com" variable is public so that you can access it from outside the component.

cheers!
Reply
#3
(21-02-2018, 04:47 PM)josemendez Wrote: Hi there,

If your cloth is not attached to any transform and is just floating around freely, then you will have to estimate its position by averaging the particle's positions. There's a sample snippet in the documentation that does exactly this:

http://obi.virtualmethodstudio.com/tutor...icles.html

It is the "ActorCOM" component (COM stands for Center Of Mass). You will want to modify it slightly so that the "com" variable is public so that you can access it from outside the component.

cheers!

Thank you very much sir. That is exactly what i needed.
Reply