Improved performance
This commit is contained in:
@ -29,6 +29,9 @@ func _physics_process(delta):
|
||||
if !body.is_on_floor():
|
||||
body.velocity.y -= gravity * delta
|
||||
|
||||
if !body.velocity:
|
||||
return
|
||||
|
||||
body.move_and_slide()
|
||||
|
||||
func on_direction_changed(new_direction: Vector3):
|
||||
|
Reference in New Issue
Block a user