I was wondering if you had a defautl cube with default rigidbody added to it how much force would it need to take off?
+/- 3.5 (Newtons) in the direction Vector3.up
so, you need 3.5 units of force to life 1 unit of weight? Anything else will not lift the unit?
Simple test…
using UnityEngine;
using System.Collections;
public class lift : MonoBehaviour {
public float force = 0;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void FixedUpdate () {
rigidbody.AddForce(Vector3.up * force);
}
}
In testing… I used 3.5, did nothing. However, I got smart…
lift = mass * -gravity +…
So, if I had a mass of 1, and a gravity of -9.8 then I would need 9.8 to match gravity, anything above that would force the cube up. so, 9.9 slowly moved the cube up.
with a mass of 5, it required more than 49 units to move it up. This movement is proportional to mass. So if I moved the 1 unit mass above 9.8 by .1, it took .5 to move the 5 unit mass object up at the same speed.
Ok thanks. Just a though thinking of a prop plane you would need to move forward to gane the speed. Any way as you move forward so speed up the force as you gain speed? Thanks(I program in unity script so if you just told me in general how i could figure it out unless you program in us)
yes, f=ma. Strange, because I did EXACTLY the same test as you did before I posted and for some strange reason 3.5 lifted by cube…
alright so what ever the mass is i need that force correct?
mass * antigravity = equlibrium (the point at which the object should not fall.)
This does not take into any account velocity. As you increase the force you get upward thrust.
So in your model, say your plane reaches 20mps or about 44 miles per hour, you then achieve equilibrium. An speed less than that is less equal thus giving you no upforce. anything above it is upforce.
Apply these forces at the wing tips of each aero surface in a downward direction from the wing. (not world down or you wont be able to maneuever) This also include the rear winglets. You can then fly in a straight line very easily by simply maintaining speed.
So upward force = mass * antiGravity * localVelocity.z / equilibriumSpeed. (500 * 9.8 * 20 / 20 == 4900 newtons of force or equilibrium)
500 * 9.8 * 25 / 20 == 6125. So as you pass the speed needed to keep you up, it starts forcing the plane up.
Next, centerOfMass. This increditbly crucial in your lift surfaces. Basically you are working with 3-4 points of lift. You want to balance your plane in that area so that your tail doesnt sag or tilt.
ok thanks if you want i can show a web player on what i have. Is there a way to get an object speed?
Edit: currentlyi have very basic prop plane and hears my code(Crude)
rigidbody.AddForce (Vector3.up * force);
rigidbody.AddForce (Vector3.forward * 9.001 );
//rigidbody.velocity = Vector3.forward * vb;
force += 0.01;
Debug.Log("HEY");
how should i incorporate velocity?
well, rigidbody has a velocity that measures the object’s movement in world space. This is a Vector3 showing direction. Use InverseTransformDirection to convert that from world to local.
var localVelocity = transform.InverseTransformDirection(rigidbody.velocity);
// so then
var forwardAirSpeed = localVelocity.z;
You could then just take that speed and use it in an equation.