So, I'm making a ball game. Where you pick up the ball, drop it on a ramp, and it flies off in to blocks. The only problem right now is it falls at a normal speed, then lightly falls off, not nearly fast enough to get over the wall and hit the blocks.

Is there any way to make the ball go faster down the ramp? Maybe even make it go faster depending on what height you dropped it from (e.g. if you hold it way above the ramp, and drop it, it will drop faster than if you dropped it right above the ramp.)

  • \$\begingroup\$ Do you need strict control over the ball's path? If not, I'd suggest slapping on a rigidbody and letting PhysX do the work. \$\endgroup\$ Apr 2, 2012 at 16:22
  • \$\begingroup\$ this can be done with base line physics integration V_f=V_i + a*t considering a is gravity in this scenario, so you can either write up your own physics, or see if Unity has its own physics framework for you to use. \$\endgroup\$
    – gardian06
    Apr 2, 2012 at 16:43
  • \$\begingroup\$ Remember that physics engines expect you to run your simulations at scale so since Unity works in Meters. 1. What size is your ball? If it's really big, the ball will roll like a bolder and not like a pebble. 2. What is the mass on the ball? 3. Is it running with default gravity? 4. What type of PhysicsMaterial are you using? Provide these answers and I can give you some better ideas. \$\endgroup\$
    – Chuck D
    Apr 2, 2012 at 16:48
  • 2
    \$\begingroup\$ @gardian06 Unity does have it's own physics framework... it integrates PhysX, as I had already mentioned... Also, explicit euler is not the ideal form of integration to use for a physics simulation. \$\endgroup\$ Apr 2, 2012 at 16:54
  • \$\begingroup\$ ktodisco I already have a rigidbody on it, the physics of that aren't strong enough. Guardian I'm already using Unity's engine \$\endgroup\$ Apr 2, 2012 at 18:17

3 Answers 3


One possibilty would be to use AddForce in the direction of the current velocity of the rigidbody. You could measure the height of the dropping point and use this number to calculate the added force.

var r:Rigidbody = ball.rigidbody;
var power:float = 3.0;
r.AddForce(r.velocity.normalized * power);

See AddForce, and Force.Mode.


It sounds like you want to increase the mass of the ball. Play around with the parameters of the Rigidbody-component in Unity. Increase the mass, set "drag" to zero etc. Maybe you'll also have to tweak your level a bit for it to work (if your ramp is really steep, then there's probably no way the ball will jump over that.. or you could cheat and apply a force whenever the ball hits the bottom of the ramp).

  • \$\begingroup\$ Drag is already set to zero, and mass is 1. But I'll mess around with those. The ramp makes a "J" shape, the ball falls down the arch of the J then is supposed to shoot off the bottom. I'll mess around with the stats and let you know how it goes. \$\endgroup\$ Apr 3, 2012 at 0:02
  • \$\begingroup\$ Changing the mass seems to do nothing at all, I can set it to 50 or 0.0001 and there's no difference. \$\endgroup\$ Apr 3, 2012 at 1:26
  • \$\begingroup\$ @TimothyWilliams did you try increasing the gravity as well? It's in Edit > Project Settings > Physics. Depending on the scale of your world, you might have to increase gravity to make it look more realistic. \$\endgroup\$
    – bummzack
    Apr 3, 2012 at 6:05
  • \$\begingroup\$ Changing the gravity doesn't help much either, decreasing it makes it flow high enough over the wall, but then it goes too slowly. \$\endgroup\$ Apr 3, 2012 at 19:58

Increase velocity of the ball in y direction and increase restitution of the wall and ball

  • \$\begingroup\$ How do I do those things? And what would each thing do? \$\endgroup\$ Apr 5, 2012 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .