Player Dodge?

Can anyone recommend how to make an effective dodge?
Like whenever the player presses “A” no matter where the player is or in what direction he is facing he jumps left, and the same for a right button?

It’s actually easier to do a dodge THIS way than in a way where it only works in certain circumstances. You simply have the appropriate Input Action events set an appropriate flag in the AnimBP (e.g. bIsDodge)

Then, simply take every anim state from which the player CAN dodge and create a transition to the Dodged state.

What I do here is I use an “Entered State” event to send the data BACK to the Character BP to do things like launch the player, grant iframes, etc. This way, the State Machine controls all of the circumstances from which one CAN dodge (maybe while doing certain melee attacks or reloading or clinging from a ledge or whatever, the player cannot dodge; this will facilitate that kind of setup)

Sorry i should have mentioned, for this i mean in an FPS framework, i dont care about the animation just the movement itself

Oh. Well, then use a Launch command to shove the player to one side rapidly would be how I would do it. Just set the Launch vector to be rotated by the Control rotation, give it a steep horizontal element and a shallow vertical one so the player moves through the air very fast but doesn’t stay in the air very long.

You can actually fine-tune this with a timeline node that repeatedly fires launch commands with “override velocity” checked, so that you can use the Timeline curves to adjust the speed over the duration of the dodge (for example, having it start with a lot of speed but end with very little so that the dodge can’t accidentally send the player flying if he does it near an edge).

and im stuck trying to get that together