Page 1 of 1

Raycastvehicle velocity problem

Posted: Tue Dec 08, 2020 3:30 pm
by rockapat
If I drop a rigidbody box to the flat ground it comes to rest and its linearvelocity gets near to zero, as expected.

If I do the same thing with a raycastvehicle it comes to rest too but its linearvelocity never gets to zero!

I guess the suspension force is setting the linearvelocity since it is in its direction (upwards in my case). This can be seen in the forklift demo aswell.

Is this a known issue (or rather correct behaviour)?

Re: Raycastvehicle velocity problem

Posted: Wed Dec 09, 2020 5:58 pm
by rockapat
Two workarounds I figured out, if anyone interested:
* Get linearvelocity from other rigidbody constraint connected to the raycastvehicle.
* Modify updateAction in btRaycastVehicle to store copy of linearvelocity before updateVehicle is called.