Esempio n. 1
0
        bool GroundCollision(Fixture fixtureA, Fixture fixtureB, FarseerPhysics.Dynamics.Contacts.Contact contact)
        {
            FarseerPhysics.Collision.Manifold man = new FarseerPhysics.Collision.Manifold();
            //get collision manifold
            contact.GetManifold(out man);

            if (man.LocalNormal.X == 0 && man.LocalNormal.Y == 1)
                _grounded = true;

            return true;
        }
Esempio n. 2
0
 /// <summary>
 /// Farseer Physics callback.  Handles the case where two objects collide.
 /// </summary>
 /// <param name="contact">Contact point.</param>
 /// <param name="oldManifold">Manifold from last update.</param>
 private void PreSolve(Physics.Dynamics.Contacts.Contact contact, ref Physics.Collision.Manifold oldManifold)
 {
     HandleContact(contact);
 }