So i’ve been using Cobra Code’s Dash system for my game and its wonderful.
However, the character only dashes towards the direction hes facing and I want him to dash towards whatever direction he’s walking to.
(If he’s walking backwards I want to set his rotation towards that direction and dash)
I tried to use “Get last input vector” instead of “Get actor forward vector” and it works, but the dash force is only applied when im holding down the key, meaning if I let go of one of the “WASD” keys mid dash animation, the character just stops.
I feel like this is an easy fix, but i’m lost on how to snap his rotation towards where he’s walking to.
First you need to understand what your input is relative to. If you are using the Third Person example it would be relative to the controller (camera). So get it and transform that direction and store it.
Next you need to have a fallback if there is no input. (it is usually “backwards” but you might use your character’s facing direction instead)
After that you just rotate your character and play your animations and timelines.
Now the force is being applied even when i let go of one of the “WASD” keys and the character snaps to whatever direction hes walking to.
The problem is now that the dash force seems to be influenced by the world axis
If im facing one way the character dashes correctly to towards all directions but if im facing the oposite way, or any other way, the dash force seems to pull my character.