Hi, I have an object in my scene that is always moving left and right at an equivalent velocity and distance.
The object’s velocity is ~ -0.25 left and ~0.25 right. It moves approx. the same distance left and right.
I want this object to move perpendicular to its left and right velocity no matter which direction the object is facing. I calculated the cross product of the velocity and upward vector, but since the velocity is left then right, it will move forward a unit and then back a unit…
How can I get my object to move towards its perpendicular vector?
There are many vectors that are perpendicular to the left-right vectors you described and they actually form a plane that contains all perpendicular vectors.
To be a bit more specific to your problem: if your object moves left-right, up is as perpendicular as forward or any combination of the two. Can you explain in more detail what you’re trying to achieve?