Get the direction the player is looking

I am trying to make a sort of dash. When you hit the key I want you to be pushed in the oposite direction of where you were looking (Almost like a rocket jump). I was planning to use launch character to accomplish the push, but I have no idea how to get the direction I want to push the player in (Or how to get the direction the player is looking).

Any tips?

Edit: Whoops. That might have been the wrong category.

Here’s how I would do it:

This is in the Character blueprint, so tick event is updating the variables every frame. I’ve found out the world rotation of the player mesh, i’ve broken the node to single values, taking away 180 degrees from pitch rotation (so it give you the opposite), then putting it back together again and saving those values to the DashRotation variable.

You do not really need the WorldRotation variable if you don’t want to.

Hmm try getting the world rotation from the camera, that might take the look angle into consideration too!

I just tried it and it’s working for me, change the target of the GetWorldLocation to be the camera.

This is almost working for me. The problem is that my character is only pushed horizontally. For example, if I look at the ground and dash, I get pushed backwards along the ground, but I would like it to push me up into the air.

This is how i try to make the dash itself. Not sure if this might be where the problem is?

Thanks, works perfectly! :slight_smile: