Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving a rope
#1
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,
Reply
#2
(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,
Reply
#3
(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 !
Reply