Sign in to follow this  

Determine if sprite is children of group

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.

Share this post

Link to post
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?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.