Players can "fly" when they jump

My players can look down and press the down arrow to go up when my fallspeed is low. The same is true for going down they and look down and press forward to go down at MUCH faster speed then normal.
Sorry if this a stupid question but do you guys know the fix?

are you using charactercontrol or bettercharactercontrol ?
and, if you are using bettercharactercontrol, can you provide a test case ? (a very small program with a main method that we can copy paste and execute to reproduce the bug).

If you are using a control similar to the one in the “test physics”, it’s normal to have some bugs : you are not suppose to use it in production. Most of your problem will disappear if you project your vector movement on the horizontal plan (i.e. you set the y to 0. Then normalize & do stuff).

As was said, the character control (both of them) just do what you tell them to. If you apply an upwards vector thats larger than the fall speed the character will move up.

Thanks guys I fixed it by adding this line in the update loop.

you should also normalize camdir x and z, because when you are looking up, they are small,

lets say vector is [0.1, 0.9, 0.1] when you are looking up and going in some direction
when you do setY(0), it will be [0.1, 0.0, 0.1] and after normalize, it should be cca [0.7, 0.0, 0.7] - normalize() means length() should return 1