Constraint physics engine axis


I use physics to move a ship in a 2D plane (x y) like a 2d lunar lander game. The ship sould rotate arround the z axis only.

Unfortunatly after a few moves and collisions, the ship rotates arround x or y axis.

How can I limit rotation arround the z axis only ?

In unity there is checkboxes to do that. I did’nt find any constraint in playcanvas and suppose you have
to do it in the update function, but how ?

Thanks for your help,


Set the angular factor on the other axis to 0


Thanks, it works :slight_smile: