Jump to content

[SOLVED] Synchronize Moving Speed of Objects


Recommended Posts

Posted

We need to make two objects, made of different material and with different mass and shape, to move alongside each other with the exact same speed. What is the best (or recommended) way to achieve this?

We have tried setting the speed of the first object with addForce and applying the addImpulse method in flush() for the second object. Unfortunately, this does not yield satisfactory results and the speed of the second object changes with change in mass or other parameters. 

Posted

Hello, Tsetso

Speed can be set directly through BodyRigid::setLinearVelocity. Does it work for you?

Posted

Hey Andrey, thanks for the tip! We ended up with a combination of addForce() and setLinearVelocity(). Just add to increase the forces magnitudes so they can leak into the final result.

  • silent changed the title to [SOLVED] Synchronize Moving Speed of Objects
×
×
  • Create New...