Rotating to Look At
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
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement