Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

PinJoint2D has an odd "self stabalizing" behavior. #104

Open
SirLich opened this issue Feb 4, 2024 · 4 comments
Open

PinJoint2D has an odd "self stabalizing" behavior. #104

SirLich opened this issue Feb 4, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@SirLich
Copy link

SirLich commented Feb 4, 2024

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:

  1. Download example project
  2. Press 'Play'. You can view the unicycle crash to the ground (Godot Physics)
  3. Change physics to Box2D (included in the project already)
  4. Press 'Play'. You can view the unicycle self-stabilize itself, and drive around the test area.

Box2D:

image

Godot:

image

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)
@SirLich SirLich added the bug Something isn't working label Feb 4, 2024
@SirLich
Copy link
Author

SirLich commented Feb 4, 2024

Note: I've tried Rapier, and it actually works!

@Ughuuu
Copy link
Collaborator

Ughuuu commented Feb 5, 2024

Interesting. I wonder if the angle limits are enabled even if the flag is off. I'll investigate and see.

@SirLich
Copy link
Author

SirLich commented Feb 5, 2024

@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.

@SirLich
Copy link
Author

SirLich commented Feb 5, 2024

Turning the 'moter' on is fine, until the seat hits the ground, then it yeets itself as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants