loop de loop

Started by
1 comment, last by ms75214 11 years, 9 months ago
How do you program a plane to do a loop de loop like this?
http://postimage.org/image/m8xr1mxhn/
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 :)

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?

This topic is closed to new replies.

Advertisement