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 / Possible bug with virtual buttons and GetRawTouchCount

Author
Message
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 9th Sep 2014 20:16
I've always liked using virtual buttons. They allow you to easily simulate multitouch features without going into the fracas of dealing with all the touch input. You can touch a button and it won't count as a pointer-event.

However, one would think that at least getRawTouchCount(1) would show a touch when a button is pushed, but it doesn't.

Right or wrong? I would find it right and easier to use if that command counted touched buttons too.

My hovercraft is full of eels
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 11th Sep 2014 00:18
Another thing, the getRawTouch-commands don't seem to work on iOS devices, which sucks a fat one.

My hovercraft is full of eels
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Sep 2014 00:30
If it has the word Raw in the command name, it isn't compatible with all devices.

lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 11th Sep 2014 00:47 Edited at: 11th Sep 2014 00:48
But it does have the word "touch" in it. So the "raw" part of the word means "random device" ?

I understood this "raw" command for it to be incompatible with windows, of course, but not with touch-devices that AppGameKit is aimed at.

My hovercraft is full of eels
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 11th Sep 2014 12:55
If the touch commands doesn't work in iOS then you can't capture more than a single touch.

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 11th Sep 2014 15:39
Quote: "Another thing, the getRawTouch-commands don't seem to work on iOS devices, which sucks a fat one."


I just tested it on iOS and it works here.

Quote: "However, one would think that at least getRawTouchCount(1) would show a touch when a button is pushed, but it doesn't. "


I'll consider adding a new parameter like getRawTouchCount(2) or something that will return touch events captured by edit boxes and virtual buttons.
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 11th Sep 2014 15:51
Quote: "I just tested it on iOS and it works here."


That's good news, I'll continue tests. Did you test in v2 or v1? I did it in v1

Quote: "I'll consider adding a new parameter like getRawTouchCount(2) or something that will return touch events captured by edit boxes and virtual buttons."


Good idea. The GetPointer-commands are already separate from the GetRawTouch-commands since a click on PC doesn't register as a RawTouch, this is why it felt odd when RawTouch doesn't register on buttons.

The fact that GetPointer doesn't register when using virtual buttons is a good thing though.

My hovercraft is full of eels
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 11th Sep 2014 16:00
Version 2, but nothing has changed that should have affected it. The touch events are handled by the interpreter side of the app in EAGLView.mm so if you changed anything in there it might have caused it.
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 11th Sep 2014 20:15
Righto. Thanks for your swift replies.

My hovercraft is full of eels
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 20th Sep 2014 20:21 Edited at: 20th Sep 2014 20:21
My bad, it wasn't getRawTouchCount(), it's getting the coordinates that doesn't work on iOS (tested on iPad)

This only results in 0.000000 on all coordinates:



Works as expected on android

My hovercraft is full of eels
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 21st Sep 2014 02:34
Touch IDs are not guaranteed to be continuous, you should use the value returned by GetRawFirstTouchEvent or GetRawNextTouchEvent as the ID number.
lilpissywilly
AGK Developer
14
Years of Service
User Offline
Joined: 10th Sep 2010
Location: Office Chair
Posted: 21st Sep 2014 11:44
So the first touch event ID can be anything?

I'll try it, thanks.

My hovercraft is full of eels

Login to post a reply

Server time is: 2024-11-25 09:20:32
Your offset time is: 2024-11-25 09:20:32