How do you program a plane to do a loop de loop like this?
http://postimage.org/image/m8xr1mxhn/
loop de loop
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
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
How about a few hand-crafted Bezier curves?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement