Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extends Node2D
- # member variables here, example:
- # var a=2
- # var b="textvar"
- var vector_a = Vector2(0,0)
- var vector_b = Vector2(-50,-50)
- var count = 0
- func _ready():
- #print(rad2deg(vector_a.angle_to_point(vector_b)))
- #print(str(Vector2(0.0,0.0).angle_to_point(Vector2(50, 50))))
- #print(vector_a.distance_squared_to(vector_b))
- pass
- func _draw():
- draw_line(vector_a,vector_b,Color(255,0,0))
- print("hello")
- print(vector_a.angle_to_point(vector_b))
- func _on_Timer_timeout():
- count +=1
- print(count)
- vector_b += Vector2(1,0)
- if vector_b.x > 50:
- vector_b.x = - 50
- update()
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement