I have two objects. A and B.
A moves around freely (A player.)
B is an object which simply moves around based on a 'movement vector" , that is, a "horizontal" and "vertical" vector (NOT one fed in by the keyboard).
So, naturally, that "movement vector" is relative to B's rotation (i.e, "(0 , 1)" will move it forward)
I need to calculate that "movement vector" based on a "destination node" (which is calculated by a timer).
I could just say "look at the node, and move forward"
But, I need B to move towards the node even if its transform.forward changes.
I thought I just needed to multiply a direction vector by transform.forward of B. But I'm dumb! Thanks in advance for any help.
↧
How to find the direction to translate an object, to move towards a point, regardless of rotation?
↧