All Questions

Community

L
Luc-Frédéric Langis

Maybe a little error at 3:28 for run.gd

Hi, I think there is a small mistake at 3:23 when refactoring the following line

if owner.is_on_floor(): 
if _parent.velocity.length() < 1.0:   _state_machine.transition_to("Move/Idle") 

to

 if owner.is_on_floor() and _parent.velocity.length() < 1.0: _state_machine.transition_to("Move/Idle") 


It will the player switch constantly between the air/run state. I think it relate that the condition can be false even if the player is still on the floor.