Bodies rotation around their axis

According to one of the picture in the doc pointed to by @JohnK, the main pivot should be on the right of the rear-right wheel, so in your case it is x=-50 and not x=+50:

https://www.babylonjs-playground.com/#AYD85K#4

See line 69.

I have commented out the rotation of the front wheels when the car is moving (lines 186-187 and 193-194): when uncommented, you will see it does not work as expected as soon as you use A/D and move forward.

I think it’s because you should not use setPivotPoint for the front wheels but instead create a dummy mesh as the pivot point and parent the wheel to this point (do it for each front wheel). That’s how it is done in the sample, and as it is working it must be the right way to do it.

1 Like