Friction not working?

So I’m trying to apply friction to a physicsImpostor, like so:

let sphere = BABYLON.Mesh.CreateSphere('sphere', 8, 2, scene);
sphere.physicsImpostor = new BABYLON.PhysicsImpostor(sphere, BABYLON.PhysicsImpostor.SphereImpostor, {
	mass: 30,
	friction: 0.07,
	restitution: 0
}, scene);

However, there is no sign that friction is affecting the velocity of the object (I’ve tested with low and high numbers). How would I implement this correctly?

Thanks in advance!
https://www.babylonjs-playground.com/#BEFOO#328

1 Like

Hiya BattleSquid.

Spheres show no friction-effect… cuz WHY? Yep, not enough “contact” surface area. Billiard balls will roll across sandpaper, no problem. :slight_smile:

sphere.physicsImpostor.physicsBody.linearDamping = 0.4;

That should work. Here’s an older post… which has a playground demo. Party on!

2 Likes

Worked like a charm! Thanks! :smiley:

1 Like

linearDamping? But the sphere continues to rotate along the Y axis :frowning:

do angularDamping maybe

sphere.getPhysicsImpostor().physicsBody.angularDamping = 0.86
2 Likes