You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'lock_rotation = false' does not free the RigidBody3D to rotate freely. It can be rotated by transform.basis, but when dropped, the body does not rotate. The check-box in the Inspector behaves correctly, but the body rotation remains locked.
To Reproduce
For a RigidBody3D, set lock_rotation = true in the Inspector, or by code. Setting lock_rotation = false will not unlock the rotation.
I have provided a test project below that requires the Addon folder with Rapier installed.
Run the project. I must note that if the Godot Editor is moved to my second screen, running the project will cause the cube not to reset to the starting position. IDK what to do with that info.
1a. The left cube is frozen, showing a separate bug relating to starting frozen identified elsewhere. Please disregard it.
1b. The right cube will fall when the app runs, and come to rest normally on one side.
Clicking 'Drop Cube' will return the cube to the start position and drop it again at a random starting rotation.
Clicking 'Lock Rotation' calls function that causes lock_rotation = true.
Clicking 'Drop Cube' sets lock_rotation = false, returns the cube to its starting location, randomly rotates it, and lets it fall.
Observe the cube does not rotate onto a face after it hits the ground, remaining in the same orientation as when it was released, balanced on a vertex.
Commenting out 'lock_rotation = false', shows transform.basis still allows rotation to be manually set while locked.
Expected behavior
Setting lock_rotation = false should allow the RigidBody to rotate due to the effects of gravity, impacts, or other processes.
Interestingly, it seems the transform is not set and the bodies don't move back again. My initial guess is the freeze state maybe does something to the shapes that resets them and transform is not applied.
As for the lock_rotation, I forgot to update it, fixed that. The position not updating is still not fixed, so leaving this open.
The fix will enter in 0.8.6(for lock_rotation)
Describe the bug
'lock_rotation = false' does not free the RigidBody3D to rotate freely. It can be rotated by transform.basis, but when dropped, the body does not rotate. The check-box in the Inspector behaves correctly, but the body rotation remains locked.
To Reproduce
For a RigidBody3D, set lock_rotation = true in the Inspector, or by code. Setting lock_rotation = false will not unlock the rotation.
I have provided a test project below that requires the Addon folder with Rapier installed.
1a. The left cube is frozen, showing a separate bug relating to starting frozen identified elsewhere. Please disregard it.
1b. The right cube will fall when the app runs, and come to rest normally on one side.
Expected behavior
Setting lock_rotation = false should allow the RigidBody to rotate due to the effects of gravity, impacts, or other processes.
Environment:
Example project(zip)
rapier_lock_rotation_test.zip
The text was updated successfully, but these errors were encountered: