I'm using a class derived from hkpContactListener and implimenting the contactPointCallback() method, and I've run into a problem. At first, I was only paying attention to contact types of TYPE_TOI, because I was under the impression that they were the only "important" collisions. But then I realized that two dynamic objects of normal priority do not generate TYPE_TOI contacts, so I started monitering both types TYPE_TOI and TYPE_MANIFOLD.
So far, it seems to be working okay, except for one problem. The callback seems to be getting called twice for every one collision between two dynamic objects. During these two calls, everything in the callback event seems to be identical (the objects, the time stamp, the impact velocity, etc). I'm wondering if there is something I'm doing incorrectly that is making this happen? Or perhaps something I can do to disable it? Currently, my only solution is to record pointers to the last two colliding objects along with the time stamp, and ignore the second of the two identical callbacks by comparing those three things.
If anyone can shed some more light onto this for me, or has a better solution, I would really appreciate it.