Per-Pixel-Collision-Detection icon indicating copy to clipboard operation
Per-Pixel-Collision-Detection copied to clipboard

Check() is no longer called for my two entities

Open mahgo opened this issue 11 years ago • 4 comments

Hi,

Would you have any idea why my check() function is no longer being called when one entity is colliding with the other, after using this plugin? My checkAgainst and Type's are still the same as before.

mahgo avatar Sep 04 '13 03:09 mahgo

Hey mahgo-

What are your .checkAgainst, .collides and .type properties set to for each entity?

Thanks.

quidmonkey avatar Sep 05 '13 13:09 quidmonkey

Entity 1:

  • type: ig.Entity.TYPE.A,
  • collides: ig.Entity.COLLIDES.PASSIVE,
  • checkAgainst: ig.Entity.TYPE.B,

Entity 2:

  • type: ig.Entity.TYPE.B,
  • collides: ig.Entity.COLLIDES.PASSIVE,
  • checkAgainst: ig.Entity.TYPE.NONE,

The check() (which is to be used when the two collide) in Entity 1 is never called.

This issue is not present when the plugin is not used.

mahgo avatar Sep 05 '13 22:09 mahgo

mahgo-

Is check() ever called if the two entities overlap? Or does it only get called when the entities are in certain positions?

Also, can you verify if it returns on line 58, 74 or 116 for you?

Thanks.

quidmonkey avatar Sep 06 '13 12:09 quidmonkey

Check is never called.

Both 74 and 116 are returning.

mahgo avatar Sep 09 '13 23:09 mahgo