i have been trying to figured out how to adapt from the movement tutorials about "player move to mouse" movement into some sort of " dash into mouse " that also has the gimmick where its like "the longer you hold, the further you go" kinda like a golf if that sounds right.
However, the movement mechanic just doesnt move the player in any way. is there anything that i forget to do or i didnt notice, thankyou.
onready var power = 1
onready var maxpower = 100
onready var powerexcalator = 0.5
var velocity = Vector2()
var aim_direction = global_position.direction_to(get_global_mouse_position())
power = clamp(power+powerexcalator, 0, maxpower)
velocity = aim_direction*power
power = 1
velocity = move_and_slide(velocity)