Advertisement

Camera Movement

Started by April 21, 2002 02:04 AM
0 comments, last by FERNANDO-BRASIL 22 years, 10 months ago
Hi guys! I''m trying to do some camera movements, and I''m having a problem. I want to move the camera in space by informing ANGLEX, ANGLEY, ANGLEZ and a DISTANCE. For example. Let''s say I have a camera stopped at POSX = 0, POSY = 0 and it have to walk 10 Kilometers in a Angle of 50º. Since it were 2D, it''s quicly easy. You have to do something like this: posx = cos((50 * PI) / 180) * 10; posy = sin((50 * PI) / 180) * 10; With this you''ll get the new Camera position.... But How Do I do this in a 3D world (with POSX, POSY, POSZ and ANGLEX, ANGLEY, ANGLEZ and a DISTANCE)? Is there a specific formula to do that, or I''ll have to try a combination of the formula I passed ? Thank you guys! Any help will be mutch apreciated! Fernando
look into quanternions. there are nice tutorials on this topic at gamedev and flipcode

You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.

This topic is closed to new replies.

Advertisement