Jump to content

Delay collision detection until new sprites separate?


GreatBigBore
 Share

Recommended Posts

In my game my sprites can spawn at coordinates that have them overlapping already existing sprites. Is there a way to ignore this overlap until the two sprites separate, and then turn on collision detection? In case it matters, I'm using group-level collision detection at the moment.

Link to comment
Share on other sites

So far I'm putting my new sprites into a group that has no collision detection. In the update function, I check the .touching property of the sprites in this group. When .touching.none === true, I move the sprites into the normal group that has collisions turned on. If anyone has any better ideas, I'd love to hear them.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...