Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

godot knockback

func knockback(enemy):
    if enemy.position.x > position.x:
        vel.x = -10
   if enemy.position.x < position.x:
        vel.x = 10
Source by godotengine.org #
 
PREVIOUS NEXT
Tagged: #godot #knockback
ADD COMMENT
Topic
Name
1+7 =