Hi everyone, im having a problem with my character controller speed
When i press both axis the speed increment, i dont understand why. Do you know a way for clamping my vector3 move?…
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Hi everyone, im having a problem with my character controller speed
When i press both axis the speed increment, i dont understand why. Do you know a way for clamping my vector3 move?…
You should probably find out why, and fix the problem rather than work around the problem.
Did you try debugging? When you dump those values to the screen do they make sense?
I assume you already considered that both x and z have value ‘walkspeed’ when used, so in total, you're moving sqrt(2)*walkspeed. (Instead of 3d think 2d, moving 1 in either x or y has length 1. moving both has length sqrt(2).)
In 3D, 1+1 vector doesn't necessarily make it a 2 vector. That only works correctly if both vectors are fully aligned. Ie (1, 0, 0) + (-1, 0, 0) is much shorter than length 2.