Advertisement
otorp2

movekinematic via node2d

Oct 15th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1.  
  2. extends Node2D
  3.  
  4. # member variables here, example:
  5. # var a=2
  6. # var b="textvar"
  7.  
  8.  
  9. func _ready():
  10. set_fixed_process(true)
  11. pass
  12.  
  13. func _fixed_process(delta):
  14. var enemy = get_node("enemy")
  15. #var dir = Vector2(1,0)
  16. enemy.move(Vector2(1,0))
  17. if enemy.is_colliding():
  18.  
  19. print(enemy.get_collider())
  20.  
  21. #print(enemy.get_pos())
  22.  
  23. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement