Ball rolling down hill won't stop.

Apologies in advance I expect this is a very stupid question… but.

I have a physics scene with a ball on a hill. The hill is supposed to be made of grass, so, unless the hill is very steep, I want the ball to roll down the side of the hill for a bit, but at some point, the ball should to come to rest on the side of the hill.
I expected that if I increased the friction of either the surface and/or the ball then at some point the ball would stop rolling down the hill. But that isn’t happening.
It doesn’t matter how high I set the friction(s) or how shallow the slope of the hill is, the ball will always roll down.
I can stop the ball from rolling down the hill using angular drag, but that isn’t contingent on the ball being in contact with the surface, so it’s not really what I’m looking for.
I was thinking of using a script to increase the angular drag while the object is in contact with the surface, but it feels like I’m missing an obvious solution to this.
Can anyone see what I’m not understanding?

Hi,
I guess that’s how the physics simulation is done.

Unity Answers from 2012:
“In your case, the little bastard is ROLLING, so FRICTION DOES NOT APPLY. If you change to a cube, and sort of push it around the terrain (for example, tilt the whole terrain and let it slide), then friction is what you are looking for.”

1 Like

It’s not a stupid question.

To add a little… As @arfish has pointed out, in the real world, friction is not the issue for this problem, imagine a ball rolling along on the ground - the point of contact is not sliding (assuming a simple load case). What slows your ball down is rolling resistance, every undulation in the ground, every blade of grass that must be bent, the air that must be pushed out of the way and the tiny deformations that occur in the ground and ball as it moves, all take energy out of the ball.

As you can see there are a few solution options. But if you want different performance on the ground to the air they will all be something like:

apply aero drag
do grounded check
if grounded, apply rolling drag

drag here can either be rigidbody drag values (these are linear forces based on velocity) or your own formula defined in FixedUpdate.

You may find these worth a read:

Although the golf one only deals with flight, you can see how drag is implemented via script. Add an additional ground check and rolling drag method and you will be done.

Or if this is just a little thing happening in the background and you don’t need the detail, by all means just up the rigid body drag values until you get close to what you want.

1 Like

Agreed with the above but to add that the main reason why it’s rolling in the first place and not sliding is due to friction. If you constrain it from rolling then the force causing it to roll away from the center of mass would mainly affect the linear motion therefore slow it down.

I’ve even seen this used in games where it visually rotates but the actual physics object doesn’t so as to cause the force to affect linear movement.

2 Likes

I think angular drag will work for your case.

1 Like

Thanks all, that gives me something to work with

1 Like