Procházet zdrojové kódy

Apply gravity to Red Robot while idle (#145)

Aidan Rhoden před 2 roky
rodič
revize
fab68bcd7e
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  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: