Make sure sync to physics is disabled in editor, fixes #20230
This commit is contained in:
parent
a2a606794c
commit
0032345618
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue