Fixing my jump in third person character controller

Daniel Kirwan
2 min readOct 7, 2021

Objective: Fix the jump in the character controller

In a previous article I wrote about setting up the camera for for my controller, and it doing this I noticed a big issue. When the player jumped, the player would not be able to move in any direction. They would just stop moving and then come back to the ground.

That is not how I wanted my player to be able to jump. After a lot of head scratching as to why this would be, it was because of how I was setting the velocity of my player on the y-axis when they jumped. Because the variable is then being reset every frame the player movement is stopped.

To get around this, I created a global variable just to deal with the yVelocity of the player. This variable is only changed when the player has jumped.

I now set the new variable when the player has jumped and then set the player controller y velocity with this value before moving the player.

--

--