Skip to content

Commit 7f5dd7f

Browse files
committed
BaseCharacterBehavior: Do not disable physics process in editor
To see the guard walking in the editor canvas when the "move while in editor" debug option is enabled.
1 parent 6b1b500 commit 7f5dd7f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

scenes/game_logic/base_character_behavior.gd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ func _enter_tree() -> void:
2121

2222

2323
func _ready() -> void:
24-
if Engine.is_editor_hint():
25-
set_physics_process(false)
26-
elif character.motion_mode != CharacterBody2D.MotionMode.MOTION_MODE_FLOATING:
24+
if (
25+
not Engine.is_editor_hint()
26+
and character.motion_mode != CharacterBody2D.MotionMode.MOTION_MODE_FLOATING
27+
):
2728
push_warning("Consider setting %s Motion Mode to Floating." % character.name)
2829

2930

0 commit comments

Comments
 (0)