Jump to content
  • Advertisement
Sign in to follow this  
ms75214

loop de loop

This topic is 2181 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

How do you program a plane to do a loop de loop like this?
http://postimage.org/image/m8xr1mxhn/

Share this post


Link to post
Share on other sites
Advertisement
It depends on how you model the movement of the plane.

Could be anything from simulating the forces on the wings and rudders of the plane, to simply rotate it around the x axis.

Slightly more helpful addition:

A simple way is to have a direction vector. each frame you add this vector (scaled by velocity) to your position.
To turn, you rotate and renormalize the direction vector.

This way, you can turn in any direction, and to make a loop, just keep turning until you have completed it :) Edited by Olof Hedman

Share this post


Link to post
Share on other sites

It depends on how you model the movement of the plane.

Could be anything from simulating the forces on the wings and rudders of the plane, to simply rotate it around the x axis.

Slightly more helpful addition:

A simple way is to have a direction vector. each frame you add this vector (scaled by velocity) to your position.
To turn, you rotate and renormalize the direction vector.

This way, you can turn in any direction, and to make a loop, just keep turning until you have completed it smile.png


How about a few hand-crafted Bezier curves?

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!