The problem is that this event fires off more than once per frame, due to (I presume) the fact there are multiple shapes that comprise the CompoundBody.
Should this be happening?
Should I ignore subsequent triggers in the same frame if a contact for the CompoundBody Collidable has already been recorded, or should I create an average from each contact with this CompoundBody Collidable?
Also, if I am casting the pair involved in the collision as follows:
Code: Select all
Collidable a = pair.BroadPhaseOverlap.EntryA as Collidable;
Collidable b = pair.BroadPhaseOverlap.EntryB as Collidable;