# Paper Plane Simulator Physics Problems- Help

So I am working on creating a paper airplane simulator. Meaning a flight simulator which has no engine or thruster other than the force it starts out with. There will be the ability to gain thrust by angling down then arcing back up, and to gain lift by flying over things like fans or burning barrels.

MY ISSUES:

-I cannot for the life of me figure out how to get lift to work. The lift should be proportional to the forward velocity and be able to be affected by the barrels/fans mentioned above. A tutorial I found said to “project the plane’s rigidbody.velocity onto the plane’s forward vector using Vector3.Project, and then get the magnitude of the result.” …I am fairly novice and this is less detailed than I need to comprehend it at this point.

-I cannot get realistic turning. I have attempted to apply torque rather than ‘transform.Rotate’ but it doesn’t do anything but keep me on the same path but rotation around the different axis’s. Is this due to lift not being in play?

-I also assume I need to have angular drag and drag proportionate to my thrust?

I have scoured the web finding different links and information, but with 20+ tabs currently open and each of them either being too vague for a beginner or too involved for a paper airplane (no afterburner or airbrake on a paper airplane) I am at a loss.

If you would like to see what I have let me know. I have my environment modeled, just need the physics for my plan to work.

Please help constructively if you can!

Hearty cheers.

PS. I am using Javascript, not C#. Please try to frame answers in Javascript so I don’t need to translate.

whell dude i got a preety lame script but it works, it includes the rotation and yaw, if you want to use it just ad a new input called Yaw and set a to positive and d to negative.

``````var speed = 0;
var acceleration = 2;
var maxSpeed = 500;
var minSpeed = 0;
var Torque = 5;
var Gravity = 100;
var goback = 1;
private var rotationsave = 0;
rotationsave = transform.rotation.z;
private var checkGravity = 0;
checkGravity = Gravity;
function Start () {

}

function Update ()
{
if (Input.GetKey(KeyCode.W))speed = speed + 1 * acceleration;
if (Input.GetKey(KeyCode.S))speed = speed - 1 * acceleration;
if (speed >= maxSpeed)speed = maxSpeed;
if (speed <= minSpeed)speed = minSpeed;
constantForce.relativeForce.z = speed*Time.deltaTime;
//yaw
constantForce.relativeTorque.y = Input.GetAxis("Yaw") * Torque * Time.deltaTime/2;
constantForce.relativeTorque.z = Input.GetAxis("Yaw") * Torque * Time.deltaTime/5;

//roll
constantForce.relativeTorque.z = Input.GetAxis("Horizontal") * Torque * Time.deltaTime/5;
//pitch
constantForce.relativeTorque.x = Input.GetAxis("Vertical") * Torque * Time.deltaTime;

Gravity = checkGravity - speed;
constantForce.force.y = - Gravity/100;
if (Gravity <= 0)Gravity = 0;

}
``````