# How to slow down a rolling ball when rolling on different ground?

I’m a beginner of UE4 and I am developing a wood ball game.

I use a pawn as the ball and have a function to addForce to the ball depending on the holding time of the space key.

However, I got some trouble with the friction of the ball. Since I want the speed of the rolling ball would be different on different grounds (eg. slower on grass but faster on dirt), I try to apply different physical materials for both the grounds and ball but it seems no change even I set very high friction.

I know that I can modify the linear and angular damping in the ball but I want to know that can I modify the speed of the rolling ball by just setting the friction in the physical materials?

1 Like

So I’m an idiot, and this is probably bad for performance, but do a line trace down on tick and get the other actor, get physical material, compare to the name of the physical material you want to slow down and if it is that then change speed to x. Again probably not good for performance but try it anyways, maybe it’s not that heavy

I would like to know how others have solved this problem too.

Seems very odd that the ball is what seems to be the default control point for this kind of effect (linear and angular dampening) where from an OOP standpoint, the ground should be what’s controlling the physics change. IE: the ground should be acting on the ball, the ball shouldn’t have to check and act on itself.

I agree that friction should absolutely affect a rolling ball on a surface. (or hardness… but we don’t have that option)

Using the collision material to change angular dampening in the ball feels very hacky to me, like DancingRicardo said above, seems like alot of overhead for something that the physics engine should already be capable of taking care of.

Would ultimately break down further when considering small bounces too, flipping back and forth between 0 and .8 angular dampening just doesn’t feel right to do manually while the physX is taking care of everything else.

Can someone please elaborate on a “correct” or “standard” way that this effect is/should be achieved?

1 Like