(Making a sidescroller game)
So, I want to my player make a dash when I push a button. I see a lot of blueprints using Launch Character but, that doesn’t work to me for this 3 reasons
I want the player can dash in the air
I want the player can dash in the 8 directions (Up-right, up-left, down-right, down-left)
I want to make it until the player release the button (or energy goes to 0, part already cover), stop dashing
I already make a event which detects:
-what position the player is facing (L or R)
-if is in air (so he can use D-R, D-L)
-and if he is pressing up (for U-R, U-L)
So, the dash is almost ready. But launch character only shoot the character to one way and only in the ground.
I did my dashes with root motion animation…if you’re in air set the “character movement” to “flying” first though…
Using Add Impulse or changing velocity should work fine. Just make sure you zero out velocity values before doing so or you could get different results when falling, jumping and so on.
I don’t have my editor open but if I recall Z is up/down and X is left/right. x1 + z1 impulse would shoot him up and right while x-1 z1 would shoot your character up and left.
If you’re having a hard time I can show you an example of my wall jump blueprint which uses the same idea.
After try by my self I just make a ground dash, trying to do a flying dash just don’t work, for some reason the game don’t detect the Z axis if I was pushing up or down, but everything else works fine