Browse Source

Move visor with mouse

DricomDragon 3 years ago
parent
commit
4f34199feb
1 changed files with 2 additions and 0 deletions
  1. 2 0
      godot/scripts/Launcher.gd

+ 2 - 0
godot/scripts/Launcher.gd

@@ -32,6 +32,8 @@ func _ready():
 func _input(event):
 	if event is InputEventMouseButton and event.is_pressed() :
 		trigger(event.position)
+	elif event is InputEventMouseMotion and current_state == State.READY:
+		target.position = event.position
 
 
 func trigger(aim:Vector2):