Skip to content

RigidBody2D overwrites most transform changes done in _integrate_forces #84919

Closed
@mihe

Description

Godot version

4.2-beta [d5217b6]

System information

Windows 11 (10.0.22621)

Issue description

This is a formal issue for the partial regression caused by #84799, which in turn was meant to solve regression #83412 caused by #79977.

The summary of this issue is pretty much what the title says: Most transform changes done to a RigidBody2D from _integrate_forces will have no effect due to them being overwritten by the RigidBody2D::_sync_body_state call that happens after _integrate_forces has been called.

The one notable exception is if you first read some part of the global transform before modifying it within _integrate_forces, in which case the global_invalid flag on the RigidBody2D will be cleared and the transform change notification will actually be queued up and sent out by the eventual force_update_transform from RigidBody2D::_body_state_changed.

See #84856 for a more in-depth breakdown of the problem.

Steps to reproduce

  • Open the main scene of the MRP
  • Take note of the intended behavior described on the labels
  • Run the main scene
  • Note the fact that they don't do as described

Minimal reproduction project

overwritten_transforms.zip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions