Advertisement

Complex (?) camera moving problem (repost)

Started by October 27, 2001 12:19 PM
0 comments, last by Coderwannabe 23 years, 3 months ago
Hya all. So you may think there''s nothing new... another camera problem... read tut. nº 10 in nehe''s tuts... bla bla bla. wrong i (think) i got a problem that hasn''t been issued or if it has, i never seen it issued. it''s related to camera rotation: i''m using gluLookAt, and i need to rotate AROUND an object (im enfasing around on purpose when i got to the part of making the code for this litle project of mine i didn''t even think about it too much: "sure, it''s easy" i thought... "no need to put it on paper". rotating the camera right, left, up, down... that''s all easy. i''m having a problem with rotating around. my sister''s boyfriend has already gave me a vector soop, that was suposed to''ve been medicine, but i''m stuck somewhere, somehow, and i can''t find out howto solve this problem. so if you want to help you should pretend i know nothing at all on how to solve this issue (my program acts like if i didn''t and..... help? thanx ''ye all Th3Jesus@yahoo.co.uk
Boop Boop Beedeebee Boop!
To place the camera (or any other object) somewhere on a circle, use the following two lines:

Xpos = radius * cos( theta );
Zpos = radius * sin( theta );

To get it to move around the circle, just increment theta, or set it to time.

If you need the front vector to look at the object, use these two lines:

Xfront = -cos( theta );
Yfront = -sin( theta );


I think that''s what you want..

This topic is closed to new replies.

Advertisement