I'm trying to make a platformer that has a dash. This dash would go towards your mouse every time you left-click but I'm having trouble with it.
I don't have much (or any really) experience with Godot and Coding in general so something simple and janky would already be great.
Currently, I have something like this
dash_direction = get_global_mouse_position() - position
if Input.is_action_just_pressed("ui_mouse"):
motion = dash_direction.normalized() * dash_speed
motion = move_and_slide(motion, Vector2.UP)
but the problem is that whenever I left click it does a weird L type motion and I don't understand why