diff options
Diffstat (limited to 'scene/2d/physics_body_2d.cpp')
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 19063981bf..fa94712396 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -447,9 +447,12 @@ void RigidBody2D::_body_state_changed(PhysicsDirectBodyState2D *p_state) { lock_callback(); set_block_transform_notify(true); // don't want notify (would feedback loop) - _sync_body_state(p_state); - GDVIRTUAL_CALL(_integrate_forces, p_state); + if (GDVIRTUAL_IS_OVERRIDDEN(_integrate_forces)) { + _sync_body_state(p_state); + + GDVIRTUAL_CALL(_integrate_forces, p_state); + } _sync_body_state(p_state); set_block_transform_notify(false); // want it back |