Advertisement

Rotating to Look At

Started by May 29, 2002 07:03 PM
1 comment, last by dachande 22 years, 9 months ago
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.
Advertisement
Would you be able to explain further?

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

Thanks,
Dachande

This topic is closed to new replies.

Advertisement