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 / Cannot set sprite's depth to 101?

Author
Message
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 29th May 2012 23:05
Weird, but when I set sprite's depth to 101 and then check it's depth just after it, it prints that it's depth is set to 100.. Weird..

Follow me on twitter! @MotionStruct
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 29th May 2012 23:24
Since you should be able to set it to 1000, that is curious.

May we see a code sample?

Cheers,
Ancient Lady
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 29th May 2012 23:46
Since the depth value is converted to a float internally there is a slight floating point inaccuracy with 101 that means it gets converted into 100.99999, which when converted back to an integer becomes 100. Internally it will still be the correct depth relative to sprites set at 100.

Login to post a reply

Server time is: 2024-05-05 01:23:58
Your offset time is: 2024-05-05 01:23:58