slembcke wrote:
- Wildcard collisions: It's a high priority on the feature list for the next version of Chipmunk, but it will be a while.
Sweet. 'Cept for the "be a while" bit : P
- Collisions with no type: Yes, example below.
Super sweet. Don't know why I didn't try that.
- Multiple collision types: No as that could trigger multiple collision handlers. Hopefully wildcards will fill that void though.
Ah - bit confused. Wouldn't the ability to trigger multiple collision handlers be something desirable? I desire it.
I just realized that the documentation states that you can only have a single collision callback for a given pair defined. Is that by design or due to a technical limitation? I'm not sure what's happening underneath the hood, but I know that in C# you can add delegates together and have them all invoked at once if that has anything to do with it. I figure an array of function pointers in C is basically the same thing.
In C Chipmunk, every collision is handled by a collision handler and there is a default handler that handles collisions between shapes that don't have a more specific collision handler. I didn't think that would be particularly helpful from Unity, but maybe I should add it anyway? Would that be helpful?
Like to be be able to define something like ChipmunkBegin_Default(...) and have it receive all collisions for all objects that have no more specific type defined? Yeah, I think that'd be real helpful. I'd probably use that for everything and do more specific filtering from there, unless that'd kill performance.
On a somewhat related note - I have a collision manager to implement my wind example thang with the following methods defined:
ChipmunkPreSolve_wind_player(...)
ChipmunkPreSolve_wind_ball(...)
Doing a Debug.Log shows when the ball is in the area for the wind, being defined as a box shape sensor, but it'll only do so for the first 18 frames or so and then stop receiving collision events altogether. The _wind_player method keeps working though. Off the top of your head: any reason this might be happening? I get the impression that the _wind_ball method is getting unregistered or something.
Thank you sir, and good luck with that TODO list - I shudder to think of the length of it.