For Example:

So the player will stay like that while they push left, once they stop trying to move left they will drop like they should. I don't understand why gravity isn't effecting the play in this situation.
Code: Select all
MaterialManager.MaterialInteractions.Add(new MaterialPair(characterEntity.Material, environment.Material),
(Material a, Material b, out InteractionProperties properties) =>
{
properties.Bounciness = 0;
properties.StaticFriction = 0;
properties.KineticFriction = 0;
});
Code: Select all
void RemoveFriction(EntityCollidable sender, BroadPhaseEntry other, NarrowPhasePair pair)
{
var collidablePair = pair as CollidablePairHandler;
if (collidablePair != null)
{
//The default values for InteractionProperties is all zeroes- zero friction, zero bounciness.
//That's exactly how we want the character to behave when hitting objects.
collidablePair.UpdateMaterialProperties(new InteractionProperties());
}
}