Page 1 of 1

Why do objects sliding on a material with 0 friction stop?

Posted: Thu Dec 15, 2011 6:30 pm
by greengiant83
I made a ground box and set its material's Kinetic and Static friction variables to zero. I then slide a box across the ground (its friction settings are at the default values) After a short time the box comes to a stop. How come? I would expect with zero friction on the ground that the object would continue forever

Re: Why do objects sliding on a material with 0 friction sto

Posted: Thu Dec 15, 2011 8:25 pm
by Norbo
The default method for blending friction is to average the contribution from each involved object. So if one object in the pair has nonzero friction, the object will stop. You can modify the default blending behavior by setting the MaterialManager.FrictionBlendMethod to something else or creating your own delegate and giving it to the MaterialManager.FrictionBlender. You can also define relationships between specific materials using the material manager:

Code: Select all

MaterialManager.MaterialInteractions.Add(new MaterialPair(entityA.Material, entityB.Material), new InteractionProperties() { Bounciness = 0, KineticFriction = 0, StaticFriction = 0 });
Also, entities have nonzero default damping. If you'd like completely undamped motion, set the entity's LinearDamping and AngularDamping to 0.

Similarly, the engine will sap energy from low-energy systems to encourage them into deactivation faster. You can disable this effect by setting the entity.ActivityInformation.AllowStabilization to false. Deactivation can also be turned off by setting entity.ActivityInformation.IsAlwaysActive to true.

Re: Why do objects sliding on a material with 0 friction sto

Posted: Thu Dec 15, 2011 8:44 pm
by greengiant83
Awesome. Thanks man.