How do you make a dash that is same length regardless in which direction while having higher/lesser movement speed than the base character movement speed?
I tried looking around and followed a tutorial example https://www.youtube.com/watch?v=UkQiCZ5MC4Q on how to create a basic dash.
Unfortunately the method is unusable, since holding down 2 input directions makes the dash longer than it should be.
I tried setting the base speed to a value i want and then punting the character with “Launch Character” and then resetting it back, but that doesn’t work.
Spent a lot of time fiddling around with it on my own but couldn’t come up with a working solution so far.
I’ve meanwhile solved my issue, here’s how i did it.
What i wanted was a dodge/dash/jump that is not a multiplier of Character’s stats, like not a multiplier on character’s current movement speed in the world (how it is often done), what i wanted is a fixed value movement.
The important part here was getting the Character’s velocity, which returns a vector of movement. That way i bypass the issue that the video i posted had, where moving diagonally made the movement incorrect.
I take the Velocity Vector and normalize it. Normalizing it gives me a vector value between 0 and 1, which i then now multiply with the length of the movement i want.
In this example i also wanted the character to travel vertically at a fixed value, rather than a dynamic value.
TL;DR: Character Movement -> Get Velocity -> Normalize Velocity -> Multiply VelocityVector with how far you want your dash/jump/dodge to go -> pass it into Launch Character