Skip to content

Rigidbody2D moves with parent #370

@athyfr

Description

@athyfr

Describe the bug

Normally, in Godot, Rigidbody2Ds aren't affected by parent transforms (after initialization).

When Rapier is used, they are affected by parent transforms.

Although this creates confusing behaviour elsewhere as well, this is particularly troublesome with PhysicalBone2D, as parent-child relationships are extensively used there.

To Reproduce

Steps to reproduce the behavior:

  1. Download this example project, (taken from here) for testing PhysicalBone2D. Left is Skeleton2D w/ PhysicalBone2D, right is just rigidbodies with pinjoints.
  2. Run the project, to see how things should be.
  3. Install the Rapier physics engine into the project, and change the 2D engine in the settings to Rapier.
  4. Run the project again. Notice the strange behavior of the left humanoid.

Expected behavior

A clear and concise description of what you expected to happen.

Rigidbodies should not be affected by parent transforms after initialized.

Environment:

  • OS: Linux (NixOS)
  • Version: unstable, w/ flakes
  • Godot Version: 4.x
  • Type: parallel simd 2d

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions