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 / Predictive Collision?

Author
Message
Divided
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 31st Oct 2013
Location:
Posted: 15th Jun 2015 20:11 Edited at: 15th Jun 2015 20:12
Is there a way to check if a sprite will collide with another sprite before they do?

I'm having a flickering issue where when you tap a square, it's meant to randomly appear else where on the screen without colliding with any other object within the array.

The squares move but you can notice that when one collides it quickly reappears somewhere else.

Is there a method i'm missing or am I doing it wrong?



Don't mind the mess, I'm just testing things

Cheers
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th Jun 2015 21:10
You could use raycasting to predict a collision before it happens.

Using AppGameKit V2 Tier 1
Divided
FPSC Reloaded TGC Backer
11
Years of Service
User Offline
Joined: 31st Oct 2013
Location:
Posted: 16th Jun 2015 05:08 Edited at: 16th Jun 2015 05:09
Ah, cheers.

honestly didn't know exactly what raycasting was. Thanks a billion.

Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

Login to post a reply

Server time is: 2024-11-25 21:20:59
Your offset time is: 2024-11-25 21:20:59