|Topic was automatically imported from the old Question2Answer platform.
I have a velocity vector and I need to clamp it to the top speed. I assume I can use velocity.length() to get the current speed of the character relative to its direction in the velocity vector, but how do I clamp it? You cannot set the length of a vector to a number so I cannot use the clamp function. I’m sorry if this was confusing, any help would be beneficial. Thanks