Jump to content
  • Advertisement
Sign in to follow this  
wizardpc

3d Flight game camera control

This topic is 4833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im having problems making a realistic camera that is not just a moving a turning pivot in 3d space. as of now i have code that looks like this XMOVE = sin(camera.getYRotation() ) * speed ZMOVE = cos(camera.GetYRotation() ) * speed YMOVE = - sin (camera.getXRotation()) * speed camera.move(XMOVE,YMOVE,ZMOVE); i made camera a class, but this movement just doesn't give the plane any type of realism. the class can handel rotation and all that, i just don't know the physics or the way to approce how to make the camera fly like a plane. ALso this above code, does not work when the plane is upside down, all the values are reversed. Any help would be greatly apprecieted. THanks in advance

Share this post


Link to post
Share on other sites
Advertisement
As you noted, your method breaks when roll is introduced. Also, you don't quite have the correct equations for the yaw and pitch only case - as is, your velocity will increase as pitch increases or decreases, which probably isn't what you want.

The truth is that full 6-dof Descent-style camera control requires a fair amount of math. Here is an article that describes the process using only vectors and some trig, so it might be a good place to start. Also, for those wanting a solid introduction to 3d math I always recommend '3D Math Primer'.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!