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
This is a bug that should probably be fixed to maintain parity with the default physics engine, but I think that this behavior should be kept in Rapier2D in some way as it allows for behavior that wouldn't be possible without it.
For example, if there were a game with a player character that spins a physically-simulated sword that can also be extended or retracted, then this behavior wouldn't be possible with the joints of the default physics engine. In the default physics engine, GrooveJoint2D doesn't restrict rotation (as you stated); the only Joint2D that can is the PinJoint2D, which also fully restricts translation.
There are unique applications for this "bug" that are only possible because of it. If this is patched out of GrooveJoint2D, I think that it (or a suitable replacement) should remain in some other way, perhaps as a new joint node.
Thats a good point, thanks for the note. If this is fixed, there will be a flag to set this behaviour, eg.:
RapierPhysicsServer.joint_set_flag(joint_rid, ..., true)
Or something like that. But by default it would have to be the default way godot does it now. Maybe in the future, if godot offers the option, I will expose this to the editor too.
Describe the bug
In default Godot 2d physics engine groove joint allows 1 Translation + 1 Rotation.
In rapier groove joint only allows 1 Translation.
To Reproduce
Create groove joint and put it at an angle.
Connect two bodies, one body should naturally rotate depending on their center of mass.
Expected behavior
Body connected as NodeB should be allowed to freely rotate.
Difference
Godot2d:
Rapier:
Environment:
Example project(zip)
rapier-bug-report.zip
The text was updated successfully, but these errors were encountered: