Exemple #1
0
        internal static bool ContactPairTest(CollisionObject colA, CollisionObject colB)
        {
            var cb = new ContactResultCallback();

            world.ContactPairTest(colA.BulletCollisionObject, colB.BulletCollisionObject, cb);
            return(cb.Collides.Count > 0);
        }
Exemple #2
0
        internal static List <Collision> ContactTest(CollisionObject col)
        {
            var cb = new ContactResultCallback()
            {
                colObj               = col,
                gameObject           = ((GameComponent)col.tag).GameObject,
                CollisionFilterGroup = col.CollisionFilterGroup,
                CollisionFilterMask  = col.CollisionFilterMask,
            };

            world.ContactTest(col.BulletCollisionObject, cb);
            return(cb.Collides);
        }