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 / iOS - GetRawTouchReleased behaviour - bug or?..

Author
Message
tornado
18
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 31st Jan 2012 20:52
Hello community,

Surprisingly I couldn't get GetRawTouchReleased to work as it's described in documentation. Either documentation lacks some examples or I lack some understanding
have a look:

With this code, result is always 1 until screen is touched. And when touched, it results in 0. No difference for short/long/drag events but binary logic only
Where's the mistake, who could pls explain?

never give up
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 31st Jan 2012 22:20
Events are stored in a seemingly odd way. You need to loop through all touch events for this to work the way you would expect.

Like this:


tornado
18
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 1st Feb 2012 13:22
Thanks baxslash, got it really seems a bit complicated for newcomer...

never give up
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Feb 2012 13:27
No problem, glad to help

LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 1st Feb 2012 22:24
The reason you need a loop is because there might be many touch events between calls to the Sync() command. So if your app was running 60fps and you only took the latest event from the touch queue you would effectively miss a touch event if it happened within 15 milliseconds of the next one.

I drink tea, and in my spare time I write software.

Login to post a reply

Server time is: 2024-05-06 05:58:56
Your offset time is: 2024-05-06 05:58:56