summaryrefslogtreecommitdiff
path: root/scene/2d/physics_body_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/physics_body_2d.cpp')
-rw-r--r--scene/2d/physics_body_2d.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp
index 929b4624ee..3dde228bfa 100644
--- a/scene/2d/physics_body_2d.cpp
+++ b/scene/2d/physics_body_2d.cpp
@@ -1425,6 +1425,10 @@ void KinematicBody2D::set_sync_to_physics(bool p_enable) {
return;
}
sync_to_physics = p_enable;
+
+ if (Engine::get_singleton()->is_editor_hint())
+ return;
+
if (p_enable) {
Physics2DServer::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
set_only_update_transform_changes(true);