dimforge / rapier.js

Official JavaScript bindings for the Rapier physics engine.
https://rapier.rs
Apache License 2.0
435 stars 58 forks source link

Locking rotation on a rigidBody, or rigidBodyDesc, will not allow it to later be unlocked. #245

Closed smjnab closed 9 months ago

smjnab commented 1 year ago

If using rigidBodyDesc.lockRotations() on a RigidBodyDesc, or rigidBody.lockRotations(true, true) on a created RigidBody, it will later not be possible to unlock the rotation using rigidBody.lockRotations(false, true).

Test https://codesandbox.io/p/sandbox/lockrotationsdescbug-s2n6q3

Row 24 to 67 contain the Rapier related code and tests. testType on row 31 sets test 1, 2 or 3.

smjnab commented 9 months ago

Verified and fixed in 0.12