Direction to an object
Given a 3D positional vector p1 which also has an accompanying directional vector v1, how can i make p1''s direction vector point at any arbitary point?
To put this in more of a context p1 is the position of an enemy in a 3d landscape, the enemy has a position and a ''look'' vector. I want to set that look vector to point to any point i pass the function.
guy.directionVector = thingToLookAt.position - guy.position;
guy.directionVector.Normalize();
guy.directionVector.Normalize();
I cannot believe its that simple, i''ve been calculating angles between axes and all friggin sorts. Thx Man

This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement