Răsfoiți Sursa

Apply gravity to Red Robot while idle (#145)

Aidan Rhoden 2 ani în urmă
părinte
comite
fab68bcd7e
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      enemies/red_robot/red_robot.gd

+ 1 - 0
enemies/red_robot/red_robot.gd

@@ -143,6 +143,7 @@ func _physics_process(delta):
 
 	if not player:
 		animation_tree["parameters/state/current"] = 0 # Go idle.
+		velocity = move_and_slide(gravity * delta, Vector3.UP)
 		return
 
 	if state == State.APPROACH: