I can dash to the four directions relative to the camera, but only horizontally and can't quite get the verticality right. I want to be able to dash upwards or downwards at an angle.

This is the code for the dash right now:

``````velocity = dash_direction * DASH_SPEED
dash_direction = dash_direction.normalized()
velocity = velocity.rotated(Vector3(0,1,0), rotation.y)
velocity = move_and_slide(velocity, Vector3.UP)
``````
Godot version 3.2
in Engine

I think we will need more code. Can you post the whole script maybe? specifically we will need to see where dash_direction is defined.

`dash_direction` is not specified and `rotated` is adding rotation. Do you have a working code example?

If this is a platformer / side-view situation, the problem might be that gravity is messing up with your vertical speed so the dashes don't feel right. Try disabling / counteracting the effect of gravity while you are dashing.

It's a 3D FPS game. This is how the dash function gets it's direction

``````    DASH:
dash_direction = direction
if direction == Vector3.ZERO:
``````

This is what defines direction

``````direction = Vector3()
direction += (int(s) - int(w)) * head_basis.z
direction += (int(d) - int(a)) * head_basis.x
``````

I'm having trouble on where to apply an angle and force to said angle.

Copy pasting here from another comment
It's a 3D FPS game. This is how the dash function gets it's direction

``````    DASH:
dash_direction = direction
if direction == Vector3.ZERO:
``````

This is what defines direction

``````direction = Vector3()
direction += (int(s) - int(w)) * head_basis.z
direction += (int(d) - int(a)) * head_basis.x
``````

I'm having trouble on where to apply an angle and force to said angle.

It's better to add code to the question to get the whole picture. And maybe empty one of your comments ;-) And I miss the mouse code too.

Ah, sorry, here it is.

``````func _input(event):
if event is InputEventMouseMotion: