Tsetso Posted August 28, 2018 Posted August 28, 2018 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.
andrey-kozlov Posted August 29, 2018 Posted August 29, 2018 Hello, Tsetso Speed can be set directly through BodyRigid::setLinearVelocity. Does it work for you?
Tsetso Posted August 29, 2018 Author Posted August 29, 2018 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.
Recommended Posts