Beispiel #1
0
        private void Reset(FSFixture fA, int indexA, FSFixture fB, int indexB)
        {
            Flags = ContactFlags.Enabled;

            FixtureA = fA;
            FixtureB = fB;

            ChildIndexA = indexA;
            ChildIndexB = indexB;

            Manifold.PointCount = 0;

            NodeA.Contact = null;
            NodeA.Prev    = null;
            NodeA.Next    = null;
            NodeA.Other   = null;

            NodeB.Contact = null;
            NodeB.Prev    = null;
            NodeB.Next    = null;
            NodeB.Other   = null;

            TOICount = 0;

            //FPE: We only set the friction and restitution if we are not destroying the contact
            if (FixtureA != null && FixtureB != null)
            {
                Friction    = FSSettings.MixFriction(FixtureA.Friction, FixtureB.Friction);
                Restitution = FSSettings.MixRestitution(FixtureA.Restitution, FixtureB.Restitution);
            }

            TangentSpeed = 0;
        }
Beispiel #2
0
 public void ResetFriction()
 {
     Friction = FSSettings.MixFriction(FixtureA.Friction, FixtureB.Friction);
 }