Archived

This topic is now archived and is closed to further replies.

Direction to an object

This topic is 5332 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
well, it depends on how your direction vector is like. if it is just a x,y,z pointing in the direction, then it should work... unless i incidently swapped thingToLookAt and guy positions

Share this post


Link to post
Share on other sites