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.

Newcomers AppGameKit Corner / Creating Event at time of collision.

Author
Message
Bobojo
8
Years of Service
User Offline
Joined: 16th Jun 2016
Location:
Posted: 24th Jan 2017 05:39
Hey guys I was wondering if there was a way to track collision within the built in physics. I've tried using getSpriteCollision() however that only works for overlapping objects? It doesn't return 1 when my two sprites collide. If I turned my sprites into sensors it was able to work. Basically I want to try and get the event where one sprite bounces off the other.
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 24th Jan 2017 10:52
Can you use GetSpriteDistance()? That gives you the distance between two sprites, and gives you less than 0 when the sprites overlap.
13/0
Bobojo
8
Years of Service
User Offline
Joined: 16th Jun 2016
Location:
Posted: 24th Jan 2017 21:08
That's just what I was looking for, thanks! I'm still trying to process all these functions haha

Login to post a reply

Server time is: 2024-11-22 02:19:27
Your offset time is: 2024-11-22 02:19:27