I’ve been working with this character controller that adjusts with Cinemachine camera movement and I wanted to create a jump script for the player to use, this is the following script I have:
I press my “Jump” key (in this case, space) and it doesn’t jump at all
I do jump, but this can range from a small hop, all the way to a huge leap in the air
I had taken a break and come back after a few days and after looking over it with “fresher” eyes, my complications really just seem to come down to the keybind section (the main if statement). Is it possible this is an error in the frequency in which the Update() function is called? Any help is appreciated, as I’ve been stuck on this problem and other threads and videos I’ve looked at apply to a different kind of character controller and not the actual Character Controller component itself.
As for your issue, you’ve been accumulating gravity into the velocity non-stop since you started the game. Your jump has basically no chance of overcoming that force unless you bounce like a rabbit the entire time you play. Instead of adding to the velocity with +=, explicitly set the velocity with = when you jump.