Im having an object travel in the direction of my mouse input using “rb.velocity = vectorToTarget(object to mouse vector)) * moveSpeed”. However, the speed in which my object travels changes depending on the mouses distance from it. I just want a constant speed. How can I achieve this?
I have tried the many variations of normalizing the vector but it doesn’t change anything.
I really appreciate any replies, this problem is a headache!
Normalization turns a vector into a vector with the same direction, but a length of 1 - a direction vector. Normalizing the mouse or character position makes no sense, as those are points in space. Normalizing the direction from the character to the mouse makes a lot of sense.
yeah thanks, I realized that it was infact normalizing, however when I was moving below (1,1,1), it stuffs up. Thanks!
Please, send more code if you want some help ...
– Hellium