godot-box2d
godot-box2d copied to clipboard
PinJoint2D has an odd "self stabalizing" behavior.
Describe the bug When using a PinJoin2D to connect two Rigid Bodies, Box2D will "self stabilize" in a way that's inconsistent with Godot Physics.
To Reproduce Steps to reproduce the behavior:
- Download example project
- Press 'Play'. You can view the unicycle crash to the ground (Godot Physics)
- Change physics to Box2D (included in the project already)
- Press 'Play'. You can view the unicycle self-stabilize itself, and drive around the test area.
Box2D:
Godot:
Expected behavior While somewhat novel, I expect the Box2D PinJoin2D to function more similarly to Godot Physics.
Project uni.zip
Versions (please complete the following information):
- OS: Windows
- Godot 4.2.1-stable
- Box2d 0.9.9 (from plugin.cfg)
Note: I've tried Rapier, and it actually works!
Interesting. I wonder if the angle limits are enabled even if the flag is off. I'll investigate and see.
@Ughuuu setting the flat to True and then fiddling with the lower and upper angles doesn't appear to have any (or at least the desired) effect.
if I turn it on, and leave the angles at '0', it yeets itself into non-existance as soon as the wheel hits the ground.
Turning the 'moter' on is fine, until the seat hits the ground, then it yeets itself as well.