Jump to content
  • Advertisement

Archived

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

NiteLordz

Getting the Correct Look At Vector

This topic is 5206 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

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!