Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Whats the best way to have sprite excluded from GetSpriteHit?

Author
Message
kaband
21
Years of Service
User Offline
Joined: 22nd May 2003
Location: Chicago
Posted: 1st Sep 2014 17:32
Is there any easier/better way to exclude a sprite from collision detection other than grouping them or using categories?

I only ask as I have a number of sprites now and would have to go back an group them appropriately. The sprite in question is just an overlay on the Sprite below it and I'd like the Sprite below to return its ID on GetSpriteHit.

Thanks for your help!
Kaband
JohnnyMeek
11
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 1st Sep 2014 17:53
You could just use GetSpriteHitTest to test a specific sprite.
kaband
21
Years of Service
User Offline
Joined: 22nd May 2003
Location: Chicago
Posted: 2nd Sep 2014 16:28
I used GetSpriteHitTest and looped through an array of potential sprites. Worked like a charm. Thanks for the help.

Login to post a reply

Server time is: 2024-11-25 07:39:32
Your offset time is: 2024-11-25 07:39:32