Can I prevent collision events firing using collision rules?
Posted: Tue Apr 19, 2011 10:25 pm
If I set up a CollisionRule:
then the InitialCollisionDetected event still fires:
when the objects from the two different collision groups come into contact.
Is there any way to prevent this without filtering out the groups in the event method itself? Or, what would be your recommended method for this scenario?
Code: Select all
CollisionRules.CollisionGroupRules.Add(
new CollisionGroupPair(
collisionGroups[EntityGroup.Enemy],
collisionGroups[EntityGroup.Harmless]
),
CollisionRule.NoBroadPhase
);
Code: Select all
private void Events_InitialCollisionDetected(EntityCollidable info, BroadPhaseEntry entry, INarrowPhasePair pair)
Is there any way to prevent this without filtering out the groups in the event method itself? Or, what would be your recommended method for this scenario?