Jump to content

Determine if sprite is children of group


jevisan
 Share

Recommended Posts

Hello, i'd like to know if there's any way to determine if a certain sprite is part of a certain group. More specifically, if i can check for collision between sprite and group, and make sure the sprite is colliding with another sprite that's part of a certain group.

Thanks in advance.

Link to comment
Share on other sites

If you want to check collision and you're using Arcade then you can call game.physics.arcade.collide(sprite, group). It'll return true if they collided. You can also supply a collisionCallback that will be called with the two sprites that collided.

You should also check out "overlap".

But I get the feeling that's not quite what you're asking..? Or maybe it is?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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