Make sure sync to physics is disabled in editor, fixes #20230

This commit is contained in:
Juan Linietsky 2018-11-21 22:22:43 -03:00
parent a2a606794c
commit 0032345618

View file

@ -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);