- Home /
Boxes fall down too slow
I have the following scenario:
- Create a cube
- Scale (0.25, 1.0, 0.25). It is a tall box.
- Set Box collider material to wood
- Attach rigid body
- Make the above a prefab
- Instantiate() two of the above side by side
- Apply rigidbody.AddForce() in FixedUpdate() function The above boxes fall down. It works as expected.
Also, I saw this Rigidbody component reference manual, 'Use the right size The size of the your GameObject's mesh is much more important than the mass of the Rigidbody. If you find that your Rigidbody is not behaving exactly how you expect - it moves slowly, floats, or doesn't collide correctly - consider adjusting the scale of your mesh asset.'
However, the boxes fall down too slow for my need. I've tried changing the rigidbody.Mass and rigidbody.Drag values. Unfortunately, they still fall down too slow for my need.
What do I need to do to make them fall faster?
Thanks in advance for your help.
Answer by aldonaletto · Jul 23, 2011 at 03:23 AM
Why are you applying a force to the object, and in which direction? AddForce applied in FixedUpdate creates a constant force, like the object weight does. If the force you're applying is pointing down to the ground, the object will fall faster; if it points up, the object will fall slowly, since this force will be subtracted from gravity. I think the gravity alone can do the job for you: just create the object at some height, and it will fall like a rock. If you need it to fall faster, then change Physics.gravity or apply a force in the down direction:
var forceValue: float = 10;
function FixedUpdate(){
rigidbody.AddForce(-Vector3.up * forceValue);
}
Changing the mass will not produce any effect (remember Galileo!). The scale could affect the results, but only if the vertical scale was different from 1 (I suppose).
I apply rigidbody.AddForce(90, 0, 0) - from left to right. http://forum.unity3d.com/threads/254-slow-motion-physics?highlight=fall+slow has similar discussion. Changing the Edit->Project Settings->Time-> timeScale help.
So if there are 1000 feather & 1000 rocks, then I need to loop through 2000 objects to apply extra down-force for 1000 rocks? Is there anyway I can do that like common sense: heavier fall faster?
Heavier things fall faster due to air friction: it's negligible for heavier objects but very significant for the lighter ones. You can write a simple script that sets Rigidbody.drag according to the weight (inversely), or that applies an extra down force proportional to the weight and attach it manually or automatically to any object that has a Rigidbody.
Answer by Peter G · Jul 23, 2011 at 03:11 AM
More mass won't do anything because as Galileo discovered, more mass doesn't make the ball fall any faster; it just hits the ground with more force. If you don't like how the objects physically behave, you can increase the gravity in the physics settings or through scripting. You could also use some of the various rigidbody methods and properties to manually speed up the boxes such as setting their velocity: