Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Tiez |
I tried to clamp players max velocity using clamp() but it keeps returning MAX_SPD value. MAX_SPD is set to 5
velocity.x = clamp(velocity.x , MAX_SPD, -MAX_SPD)
velocity.z = clamp(velocity.z , MAX_SPD, -MAX_SPD)
print(velocity.x , " " ,velocity.z)
What is printed if you do not clamp the velocities?
magicalogic | 2022-12-23 05:07
everything works fine except player speed exceeds max_spd, if i dont use clamp just the velocity gets printed. When i use clamp both velocities are stuck at 5.
Tiez | 2022-12-23 06:02