Archived

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

NiteLordz

Getting the Correct Look At Vector

Recommended Posts

Ok, so i have my model in my world. i want to move it to a new location. i can not seem to get the correct look at vector to move my object/model towards the new location. someone please help me out here. this is killing me. thanks

Share this post


Link to post
Share on other sites
Look-at vector?

If you want to move an object in world space, apply a world translation. D3DXMatrixTranslation() will do the trick. Set that to the world matrix, and it''ll move.

I like pie.

Share this post


Link to post
Share on other sites
the lookat vector from your position (yourPos) to another position (theirPos) is simply theirPos - yourPos and then normalize the vector.

-me

Share this post


Link to post
Share on other sites