- Home /
opposite of forward for Vector3 translation
What do I change or replace forward with in this code
transform.Translate(Vector3.forward *amtToMove);
to make it translate in the direction opposite (I want it to go the other direction on the z-axis)
Comment
I can make it work by multiplying Vector3.forward by -1; but I was wondering if there was still a way to do it without that.
Best Answer
Answer by Eric5h5 · Nov 17, 2010 at 12:16 AM
-Vector3.forward
thanks! didn't know you could just tack on a (-) to the front of script like that! works great and much cleaner!
Your answer
Follow this Question
Related Questions
Prevent jittering of object movement 0 Answers
Transform Screen Point to Transform extension 1 Answer
Rotations and waypoints 1 Answer
Unity Car Accelerometer 0 Answers
Different between transform.Translate() and Vector3.MoveTowards? 1 Answer