Can anyone please help me out with an issue I’m having with a dive kick attack that I’ve been working on recently?
Basically, the dive kick attack is supposed to work similarly to one in the later Igavania-style Castlevania games or the Cat Suit’s dive attack from Super Mario 3D World where the player is launched at a downward diagonal angle like this:

The problem though is that due to the effect of gravity, instead of the player being launched in a diagonal straight line the player’s dive kick instead has an awkward slope to it.
I tried to remedy the problem by adding this bit of code from the gliding ability with the hope I that could use it to clamp the player character’s gravity in a way that would allow for a straight line descent to the ground but I couldn’t get it to work as intended.


