diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 07:28:47 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-01 07:28:47 +0100 |
commit | a350b42e4b9d669d786320353460469df9649d52 (patch) | |
tree | 1a0f9197e0fb806767433e91ffda2fca805810fe /scene/3d | |
parent | 51414fc987ba7c769da597e374e01a2c7df7b365 (diff) | |
parent | fab6065e353fcb0594d6f632519fd124add21461 (diff) |
Merge pull request #72473 from aXu-AP/animatablebody3d-editor-move-fix
Fix AnimatableBody3D not being movable in editor
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/physics_body_3d.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index f4ab09cd9b..c8cfcf7d7a 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -333,6 +333,11 @@ void AnimatableBody3D::_body_state_changed(PhysicsDirectBodyState3D *p_state) { } void AnimatableBody3D::_notification(int p_what) { +#ifdef TOOLS_ENABLED + if (Engine::get_singleton()->is_editor_hint()) { + return; + } +#endif switch (p_what) { case NOTIFICATION_ENTER_TREE: { last_valid_transform = get_global_transform(); |