Getting the Correct Look At Vector

Started by
1 comment, last by NiteLordz 20 years, 1 month ago
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
Code makes the man
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.
[sub]My spoon is too big.[/sub]
the lookat vector from your position (yourPos) to another position (theirPos) is simply theirPos - yourPos and then normalize the vector.

-me

This topic is closed to new replies.

Advertisement