I have a vector position and a vector that i need to translate the position by.
I know of
transform.Translate(vector, relative);
How can I translate the vector in a similar fashion?
I have a vector position and a vector that i need to translate the position by.
I know of
transform.Translate(vector, relative);
How can I translate the vector in a similar fashion?
Something like transform.Translate(0,0,1)
takes the rotation into account. So, it’s doing a lot of math to figure out where “+1 z” really goes.
But just your position vector doesn’t have a facing. That means all math is global, which is easy: A=A+B;
or A=A+Vector3.forward;
If you are faking a transform, with a quaternion Q and a vector position A, use: A=A+Q*B;
. That will move by a version of B rotated by Q.