godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
87.34k stars 19.62k forks source link

2D physics pin joint angular limits do nothing #91691

Open AlphaDragon601 opened 2 months ago

AlphaDragon601 commented 2 months ago

Tested versions

Godot 4.2.2 stable mono

System information

Linux - Forward+

Issue description

I have a very simple setup of a Node2D with two rigid body children and a pin joint child. The pin joint affixes the two bodies together. I attempt to enable "angular limit" but no matter what settings I use for the bounds nothing is affected. The body pivots just fine and can be motorized without issue. According to the code it is enabled.

Steps to reproduce

Minimal reproduction project (MRP)

project.zip

stephanbogner commented 1 month ago

I just encountered the same issue.

1) I'd propose renaming the issue to:

So it's easier to find and more precise

PinJoint2D doesn't respect angular_limit

2) People in the forum mentioning it:

3) Open issue

There is also an open issue which requests this feature. This could be closed now since the feature was "added" 🙃 (and now can be tracked via this issue)

4) Worked at some point

According to this video it seemed to work at some point (even though they never were hard limits) so I am trying to figure out when it broke. This seems to be the code responsible. Doesn't look crazy complicated but I have no experience with C++.