Jump to content

Get array of objects colliding with a sprite with arcade physics


Segger
 Share

Recommended Posts

Help!  :(

 

Currently I'm trying to use a large invisible sprite object that is set to the same position of my space ship to check for collisions of nearby objects as a sort of scanner, rather than iterating through all my objects and checking their distance.

 

I would like to be able to run some code the first time the sprite collides and when it first stops colliding so that I can add and remove options from my flight menu when they're in and out of range.

 

Is there a simple way to get an array of the objects that a sprite is currently colliding with?

 

 

Link to comment
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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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