godotengine / godotengine/godot

2D physics pin joint angular limits do nothing

Open
#91,691 6 comments 20 reactions 0 assignees View on GitHub
bug topic:2d topic:physics
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### 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

- create a Node2D scene
- create 2 rigid bodies as children, each with collision shapes and sprites
- create a pin joint 2d and attach the two bodies
- enable angular limit
- instantiate this scene into a different, larger scene
on run the limb just falls loosely
![image](https://github.com/godotengine/godot/assets/50785295/d36bea18-4e6d-4eeb-b08f-e3d049f8bed4)
![image](https://github.com/godotengine/godot/assets/50785295/7a08eceb-0efb-4d5e-95f5-976d661a5ba3)

### Minimal reproduction project (MRP)

[project.zip](https://github.com/godotengine/godot/files/15242726/project.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached project.zip minimal reproduction and the PinJoint2D angular-limit settings described in the issue, using Godot 4.2.2 with two rigid bodies. Reproduce the unconstrained pivot, then trace the 2D physics joint entry point to determine why the configured bounds have no effect; done means the angular limits constrain the limb while motorization and pin-joint attachment still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.