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 / Get Sprite First Contact command 108 issue report(can a community tester confirm)

Author
Message
Cor
AGK Developer
13
Years of Service
User Offline
Joined: 19th Dec 2010
Location: Its a trap!
Posted: 29th Dec 2012 21:47
Hello,

I updated from v1076 to 1085 and noticed a strange issue. My character collision/contact detection stopped working with the character and the platform.

so I made a small sample program that demonstrates the bug.

Tested this program in 1076 and all worked well, and 1085 does not.

Getspritefirstcontact will report 0 if you move a sprite.

let me explain further...(code requires no media)



if you comment out the code that moves a platform (setspritex) the contact will report as normal. If the platform scrolls it only reports 0. So I have come to the conclusion that getspritefirstcontact has a bug with moving platforms.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 29th Dec 2012 23:16
We recently changed the way AppGameKit handles moving Box2D sprites so that it keeps the simulation as stable as possible, this means clearing existing contacts when a body is moved. So the command setspritex(2,getspritex(2)-0.5) is clearing all contacts associated with that body, and if one of them was with sprite 1 then that is also cleared. Calling getspritefirstcontact before moving the bodies will return the contacts that occurred in the last time step. There is room to improve this so that contacts are not cleared until the next time step but for 108 it will probably remain this way.

Login to post a reply

Server time is: 2024-11-24 06:28:17
Your offset time is: 2024-11-24 06:28:17