1 decade ago by eruciform
I know that jQuery can't be used inside a canvas, but would it be possible to create something like the "inverse collision" detection that I put into this module: http://sourceforge.net/projects/jquerycollision/
I called it "protrusion" for lack of a better word. This allows one object to "trap" another, and you get a "collision" event only if the trapped entity either protrudes from or has entirely escaped the enclosing entity. It's not the same as "not collided", because both modes trigger on partial overlap. The difference is whether complete overlap or complete lack of overlap counts as a "collision".
Just a thought.
I called it "protrusion" for lack of a better word. This allows one object to "trap" another, and you get a "collision" event only if the trapped entity either protrudes from or has entirely escaped the enclosing entity. It's not the same as "not collided", because both modes trigger on partial overlap. The difference is whether complete overlap or complete lack of overlap counts as a "collision".
Just a thought.