- Home /
Applied force is increasing over time?
I apologise for the title not being very clear, I wasn't sure how to word it. I have 2 forces on my plane, one that lifts it and one that balances it with gravity. Once the plane reaches a certain speed, a force creates lift. When it reaches a different speed, another force balances it. How it should work is that the force providing lift is exactly equal to the force of gravity (9.81m/s).
void TakeOff()
{
rigidbody.AddForce (Vector3.up * 150);//Lift
if(Speed < TakeOffSpeed - 20)
rigidbody.AddForce (Vector3.down * 140.19F);//Equalizes Lift
}
The problem I have however, is that it works at first, then after about 10 seconds my airplane begins losing altitude!
Thanks
Answer by meat5000 · Sep 14, 2013 at 08:50 PM
My guess is that there is a downward velocity apparent before the Forces are equalised. If the forces are equal and the craft is already moving downward it will keep moving. You need to add slightly more than an equalised force and remove the extra force when it is stable.
If it is a very small velocity you can zero it at your chosen moment in the up/down direction and then the craft will hold still under equalised force.
As a bit of a side-read, look up damping (critical damping) and second order systems.
Your answer
Follow this Question
Related Questions
Applying force to a rigidbody 2 Answers
Rigidbody--Addforce on a Spherical Platform(A Globe) 2 Answers
Airplane Stall 0 Answers
Artificial Gravity 2 Answers