How to make a dash function?
We are trying to make a dash function that moves the character in the direction the right thumb-stick is pressed. This function would look similar to the airdodge in Super Smash Bros. Melee.
asked Jun 13 '16 at 03:29 PM in Blueprint Scripting
First of all you would have to register the input in the Project Configuration/Inputs
Then at every tick create the right analog vector like this:
And on the Dash function, assuming this is a character.
Now, if it where me, i would create a MovementComponent to add a Movement mode DASH, but that's not necessary, it's just more modular for me
The idea is that the magic numbers are variables that you can modify, not just hardcode
I recommend using add impulse if you are simply trying to boost the character in a direction (with the target being the scene root). Now if you want them to float and not fall, you can change the movement mode to Flying briefly (using set MovementMode) and disabling it afterwards. Another way to do this is to just set the WorldLocation of the character x units to the right/left of where they are and adding some form of animation in the middle to make it seem like fast movement.
answered Jul 03 '18 at 02:26 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here