Directional Dodging In Top Down Look At Mouse Controls
In my game, when in top down perspective, the mouse determines the character's rotation, but the movement input is world direction based. So W always goes UP in the world, S goes Down, A goes Left, D goes Right, all independent of your rotation.
(Move Right is the same but with MoveRight, and ABS into World Direction Y)
Problem I'm running into while implementing a dodge mechanic now is that I can't wrap my head around the math for how to tell it which dodge montage to play based on rotation and input direction. So if I'm aimed UP in the world, pressing W should play dodge forward.
But if I'm aimed to the LEFT in the world, pressing W should play dodge RIGHT (So It's still trying to dodge towards UP in the world.)
Basically I need the math to decide which montage to play based on which one would try to dodge in the INPUT direction. Feel like it has something to do with Dot Product or something but like I said, can't wrap my head around it!
asked Apr 18 '19 at 01:59 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here