Esempio n. 1
0
 public bool AllowContactGeneration(int workerIndex, CollidableReference a, CollidableReference b)
 {
     //It's impossible for two statics to collide, and pairs are sorted such that bodies always come before statics.
     if (b.Mobility != CollidableMobility.Static)
     {
         return(SubgroupCollisionFilter.AllowCollision(CollisionFilters[a.BodyHandle], CollisionFilters[b.BodyHandle]));
     }
     return(a.Mobility == CollidableMobility.Dynamic || b.Mobility == CollidableMobility.Dynamic);
 }
Esempio n. 2
0
 public bool AllowContactGeneration(int workerIndex, CollidableReference a, CollidableReference b)
 {
     //It's impossible for two statics to collide, and pairs are sorted such that bodies always come before statics.
     if (b.Mobility != CollidableMobility.Static)
     {
         return(SubgroupCollisionFilter.AllowCollision(Properties[a.Handle].Filter, Properties[b.Handle].Filter));
     }
     return(true);
 }