View Single Post
Old 18th May 2005, 02:57 AM   #3
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,382
Default

I had this problem a long time ago. As you've discovered, using the trig will give you non 0-360 deg values. You'd need to work out the quadrants you are in. You'll also need to assume a default 'up' direction too. It's all a bit nasty.

How about a different method like maintaining your angles and generating a matrix when you need it? Or perhaps using gluLookAt? (you can always read stuff back out of the opengl matrix)

Andy
Andy is offline   Reply With Quote