Obi Official Forum
Moving a rope - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Moving a rope (/thread-3642.html)



Moving a rope - lufydad - 14-11-2022

Hi,

I have a main physical gameobject, which have ropes in his children. The user can manually set the position of the main physical gameobject (like far away of its current position).
For the moment, when the user change the position, I move the gameobject of the obiSolver inside the main physical gameobject to affect his position (and then the position of the rope inside it) after that I move out the obiSolver from the main physical gameobject "to free it". However, it not very clean and moreover it causes instability right after the movement.
What would be the cleaner way to move a gameobject that contains rope ?

Thanks in advance,


RE: Moving a rope - josemendez - 14-11-2022

(14-11-2022, 03:02 PM)lufydad Wrote: Hi,

I have a main physical gameobject, which have ropes in his children. The user can manually set the position of the main physical gameobject (like far away of its current position).
For the moment, when the user change the position, I move the gameobject of the obiSolver inside the main physical gameobject to affect his position (and then the position of the rope inside it) after that I move out the obiSolver from the main physical gameobject "to free it". However, it not very clean and moreover it causes instability right after the movement.
What would be the cleaner way to move a gameobject that contains rope ?

Thanks in advance,

Hi!

By default, moving a solver will move all particles inside it since the simulation is performed in its local space. So if your object and its ropes are inside a solver, moving the solver around should work with no extra work needed. So the typical setup when you have a character with cloth, and object with chains, or some similar thing is to place the solver at the object hierarchy's root. This way when you move the object, all actors in its hierarchy move as well.

If you want to inject part of the world-space movement of the character/object onto the particles, then increase the solver's linear/angular inertia scales.

kind regards,


RE: Moving a rope - lufydad - 15-11-2022

(14-11-2022, 04:50 PM)josemendez Wrote: Hi!

By default, moving a solver will move all particles inside it since the simulation is performed in its local space. So if your object and its ropes are inside a solver, moving the solver around should work with no extra work needed. So the typical setup when you have a character with cloth, and object with chains, or some similar thing is to place the solver at the object hierarchy's root. This way when you move the object, all actors in its hierarchy move as well.

If you want to inject part of the world-space movement of the character/object onto the particles, then increase the solver's linear/angular inertia scales.

kind regards,

Thank you, it seems to work !