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.
asked Apr 19 '16 at 11:38 PM in Blueprint Scripting
Try to get the forward vector of a component inside the actor. That should give you the relative forward vector.
Hope this helps :)
answered Apr 20 '16 at 12:55 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here