This project has moved. For the latest updates, please go here.

OnCollision on FPE 3.1

Nov 15, 2010 at 2:08 PM
Edited Nov 15, 2010 at 2:11 PM

Hi, I just updated my code to FPE3.1, but I'm having problems firing up the OnCollision delegate. After trying I just realized that it is only fired when a real strong collision happens (also a the first simulation step), but not always when two fixtures contact. I'm I missing something?

Nov 15, 2010 at 2:30 PM

OK, I'm realizing that my fixtures only collide against static shapes, something is very weird here...

Nov 15, 2010 at 8:29 PM
Edited Nov 15, 2010 at 8:35 PM

Still investigating... it seems the problem is with the collision categories that don't seem to work as before. I'll keep looking at it...

Nov 16, 2010 at 9:47 AM

Me again. I have a question regarding the change of the OnCollision delegate strategy in the new version :)

Now, if the OnCollision is fired on one fixture, then it is not fired on the other one, no matter if it returns true or false?

Nov 16, 2010 at 3:43 PM

The collision categories works like in Box2D now. There is a category and a mask - not much difference between what we used to have. I might have to implement compatibility modes to keep compatibility with both behaviors.

The first OnCollision event fires - if you return false, the second one does not fire.

Nov 18, 2010 at 7:06 AM
Edited Nov 18, 2010 at 7:06 AM

Thanks Genbox, now I can understand it better :)