- Home /
how do i make a plane novedive?
i have an airplane , that its movement is contrained in rotation and position.
apon terminal damage, all contraints are removed, gravity added and the centerof mass is set to the nose of the plane, and mass is set to 1000
it falls down , but the nose does not tip , i want it done just by the pysics if i can , what else do i need to do
Answer by Muuskii · Aug 16, 2012 at 11:59 PM
In physics an object will rotate so that the center of mass is below the pivot point. If the rotation is constrained or the object is in free fall then no rotation will occur because all points on the mass are accelerating at the same rate.
The reason why a real plane's nose dips during a power failure is because that is the direction that it's hull has the least air drag. Theoretically adding drag would cause it except I have a feeling that Unity's drag is actually a force being applied to the center of mass.
Depending on how realistic this simulation is you could actually create drag functions yourself. Or you could simply script the plane to rotate towards it's velocity vector.
Remember to stop rotating the plane if it hits something or the velocity gets way too low.
P.S. Changing your plane's mass to 1000 might be a bad idea.
Thank you,
Hope this has helped!
Answer by Mizuho · Aug 17, 2012 at 12:07 AM
You can create two Rigidbodies and have one heavier than the other (one for the nose and one for the tail). Then you HingeJoint them so they don't run away from each other.
http://answers.unity3d.com/questions/14899/realistic-rotation-of-flying-arrow.html
If you don't want to instantiate the two parts separately, you can have a Rigidbody attached to an empty GameObject.
That is an idea, but you would have problems when you tried to parent the rigid bodies (to what?) but also what keeps them from getting away from eachother?
HingeJoint them together like it says in the link. Sorry, forgot to put that in my answer.
I would probably parent the Rigidbodies to empty GameObjects and then parent those to the plane.
I just attempted my solution and it works :D! Although in my case, I just changed the drag values so one of them was lower.
I had 3 Rigidbodies: one on the parent and two on the weights. Two HingeJoints on the parent that connected to each of the weights. And then with the difference on the two children, the parent did turn.