Air dash help

I was wondering if anyone could help me out with my air dash setup for the 2D platformer game I’m working on.

So basically I’m trying to make an air dash where the player character can dash forward in a straight line for a short distance while in mid-air, similar to the Flash Shift from Metroid Dread or the air dash from the Mega Man X games.

zlmxqCL

However, right now my air dash instead results in the player character travelling in a downward arc, as I don’t know how to maintain the player character’s Z velocity at the same level for the duration of the dash.

Any ideas on how I can make concept work?

If you’re using CharacterMovementComponent, you can set physics to Flying instead of Falling, during that move, and that should eliminate gravity. Otherwise, I’m not real sure if there’s a quick way to eliminate gravity from whatever is in the base MovementComponent.

2 Likes

Thanks a lot! Your suggestion worked perfectly!

2 Likes