I'm simply trying to get collision callbacks between two objects.
One is the player - a kinematic body attached to a non-sensor shape. The player's collision type is "spider".
The other is an AI - a kinematic body attached to a sensor shape. The AI's collision type is "insect".
I subclass ChipmunkCollisionManager and add it to my player as a component.
Inside that class I write the function:
Code: Select all
bool ChipmunkBegin_spider_insect(ChipmunkArbiter arbiter)
{
print(" BANG ");
return true;
}
If I make the insect/AI body a non-kinematic-body with a non-sensor shape, I'll get a callback ONLY if the AI touches the player first (and then, only once). Otherwise if the insect touches the world geometry, and then the Spider touches the AI, I never get a callback.
Thanks in advance!
David