How to write a Custom Movement Mode?

The reason you need the Z velocity is when transitioning to the falling state. It needs a proper Z value to work with, else it be impossible to gain vertical height when jumping of a ramp/bump (Velocity.Z is always 0 at the start of the falling state). The same goes for landing as the Z velocity simply gets “eaten” on impact, continuing up or down whatever slope at the same X and Y values before landing, not considering how much speed that would realistically get absorbed by the normal force of the ground.

But as you say, this is probably better handled by storing the Z component in a separate variable and handle collisions when landing on / leaving the ground, rather that having the Z component be updated continuously. After that, it’s only a matter of how I handle that variable in the CalcVelocity function, of which I’ve yet to attempt.