How to make AddImpulse relative to character vector instead of world?

I’m trying to create a dodge function in 3rd person blueprints that pushes the player character in a set X and Y direction and plays an animation.

I’m currently doing this by applying a positive float converted into a vector for forwards, and negative for backwards. decided by a branch that checks if the player’s forward vector is greater or less than 0 and then plays the forwards or backwards dodge animation.

However, my problem is that when the player turns around, on the world axis, the animation that gets played changes. I want the direction that the player dodges to be tied to how they’re moving (essentially W/Left Stick Up + dodge for forward, S/Down for backwards, as well as UpLeft and DownRight etc.) but I’ve messed up somewhere and can’t work out what nodes I need to use for the AddImpulse impulse vectors to achieve this.

Here’s what I have at the moment.


I’m not using the Launch function since it doesn’t feel as quick and plays the landing/airborne animations.

Hey

Try to get the forward vector of a component inside the actor. That should give you the relative forward vector.

Hope this helps :slight_smile:

So if move the character forwards 1 unit, then take the character mesh’s forward vector, break that vector, will X be 1 regardless of position in world?

This may help visualize it