Using joint2D for character swinging

Godot Version

4.2.1

Question

Hi! I’m trying to make a game where a monkey swings from branch to branch similar to gibbon: among the trees. I’m having some difficulty implementing the swinging movement behaviour I’m thinking of connecting my character to a “hand” with joint2D and having the hand grab and lock onto branches. Is this a viable approach or is there a better way to reproduce the kind of behaviour I’m looking for?

Definitely use joints if your going a dynamic physics route.

The other option is animation based but that is trickier.

Currently I have a “main body” connected to an “arm” by a pin joint connected to a “hand” (so I have a pin joint on either end of the arm one’s connected to the body and one to the hand). When I press space the “hand” freezes and my body swings around the hand. I’m currently trying to figure out how to limit the range of movement on the angular joints (as they appear to be broken). Is this a really stupid approach?

Nope, although joints maybe in a work-in-progress state since the move to Godot physics.