How to join two rigid body like weld

Godot Version

4.4

Question

I am working in Godot 4 (2D) and building a humanoid / leg system for physics-based movement and RL training.

My scenario

  • I have two RigidBody2D nodes:
  • Shin (RigidBody2D)
  • Foot (RigidBody2D)

The foot should behave like it is fixed to the shin at the ankle.

What I want

When the shin moves, the foot must move with it

:cross_mark: No ankle rotation

:cross_mark: No sliding

:white_check_mark: Both nodes must remain RigidBody2D (physics-based)

Stable enough for reinforcement learning training

  • In short:
    :backhand_index_pointing_right: I want a “weld-like” joint behavior for shin → foot in Godot 4.
LeftShin (RigidBody2D)
├── CollisionShape2D
├── LeftFoot (RigidBody2D)
│   └── CollisionShape2D
└── AnkleJoint (PinJoint2D)