Jump to content

reset BodyRigid


Recommended Posts

Posted

Hello everybody!

 

I construct a vehicle according to an example,I would like to start the process of resetting it in the car. Cancel the power to make it stationary car. How to do?

 

Thanks.

  • 1 month later...
Posted

Can you describe in more detail what do you mean by "resetting it in the car"? Your idea is not very clear.

If you need to instantly stop car wheels rotation, the solution depends on how you simulate these wheels.

 

  • If JointSuspension is used, the wheels are simulated with a body. In this case stopping them is simple. Set setAngularVelocity() for wheel bodies to 0. Or you can even use setTransform() for nodes (it automatically resets all velocities to 0).
  • If you use JointWheel and wheels are simulated as rays, you will have to wait for the next SDK update. There will be added 2 functions for stopping car wheels rotation: setCurrentAngularVelocity() and setCurrentLinearDistance(); both should be set to 0.

×
×
  • Create New...