Archived

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

Rotating to Look At

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

Hey, There seems to be many posts relating to rotating recently, I apologise adding to them. Here is my problem, I though I''d ask the community to get some suggestions, after getting precious little information from the web. I have an object or model at X, Y, Z position. I want to be able to use glRotate to rotate the object so that it is facing a position at x, y, z. I can''t seem to find a method to find out how much I will need to rotate to do this, any help would be greatly appreciated, Thanks, Dachande

Share this post


Link to post
Share on other sites
Well, it is just some trigonometry, so you''re unlikely to find any information on the web. Simple solution: assume w.l.o.g. that you are at the original, rotate first in the xy plane, then rotate to get the correct elevation. Draw a picture and it''ll be clear.

Share this post


Link to post
Share on other sites
Would you be able to explain further?

I''m not sure I''m interpreting you too well,

Thanks,
Dachande

Share this post


Link to post
Share on other sites