diff options
author | aXu-AP <1621768+aXu-AP@users.noreply.github.com> | 2023-01-31 23:41:40 +0200 |
---|---|---|
committer | aXu-AP <1621768+aXu-AP@users.noreply.github.com> | 2023-01-31 23:41:40 +0200 |
commit | fab6065e353fcb0594d6f632519fd124add21461 (patch) | |
tree | 238767ac55c748a2a288df3de8246edfd56e3b53 | |
parent | 0810ecaafdbee3ea747219e6ab3a8de5d2216a09 (diff) |
Fix AnimatableBody3D not being movable in editor
-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(); |