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 / GetPointerPressed() - Return 1 if one or more touch events exist ?

Author
Message
Phat
10
Years of Service
User Offline
Joined: 20th May 2014
Location:
Posted: 4th Nov 2015 20:53 Edited at: 4th Nov 2015 21:07
Hello.

I explain the problem :



GetPointerPressed() is not working when GetRawTouchCount() = 2.

But the description at this page says : Return 1 if one or more touch events exist.

Trying to do something about blocking/allowing actions in my game, GetRawTouchCountPressed() don't exist. I need something at this particular event. Someone can help ? Or have another solution ?
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 4th Nov 2015 22:11 Edited at: 4th Nov 2015 22:13
try this, for me it works.
means one or two fingers show pressed.
me using latest steam version ide & player.
AGK (Steam) V2 Beta .. : Windows 10 Pro 64 Bit : AMD (15.7.1) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Phat
10
Years of Service
User Offline
Joined: 20th May 2014
Location:
Posted: 4th Nov 2015 22:33 Edited at: 4th Nov 2015 22:37
Mhhh, i will try that, thanks



Edit : still not work
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 4th Nov 2015 22:51
I use this:



In this example, you are checking and setting the RawTouchValue for each touch and iterating through every active touch, every new touch event is counted and acted upon (in the dotap function) regardless of whether previous touches have finished. Multi-touch can take a while to get your head around at first.
V2 T1 (Mostly)
Phone Tap!
Uzmadesign
Phat
10
Years of Service
User Offline
Joined: 20th May 2014
Location:
Posted: 4th Nov 2015 23:53 Edited at: 5th Nov 2015 00:06
Thanks for the fast answers AppGameKit community !

I need improvement in multi-touch.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 5th Nov 2015 10:44
hmm, if GetPointerPressed not worked as expexted with multitouch,
maybe u useing a other agk version than me or it belongs the device os itself.
or did you using the sync more than once in a main loop anywhere?
instead of getpointer... the Multitouch commands should work.


AGK (Steam) V2.0.15b : Windows 10 Pro 64 Bit : AMD (15.201.1151.0) Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
Phat
10
Years of Service
User Offline
Joined: 20th May 2014
Location:
Posted: 5th Nov 2015 18:17 Edited at: 5th Nov 2015 22:19
Yeah, it's like i need to code the GetPointerPressed() myself, but no problem ^^

I am on AppGameKit 2.014b at this moment.

I have fixed my problem with this code :
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 7th Nov 2015 21:33 Edited at: 7th Nov 2015 21:34
I don't use the pointer commands if I think there's a chance the player will be touching the screen with more than 1 finger and instead use the touch commands instead.

A simple example:



I did this for someone else on this thread so you can see what I was trying to do - it may or may not be relevant to what you're doing.

I still use the pointer command for things like menus where it doesn't matter so much if the player mashes the screen with their stubby, sausage fingers.
Invaders of the 29th Dimension - available now on Google Play
Find me on indieDB

Login to post a reply

Server time is: 2024-11-17 01:01:17
Your offset time is: 2024-11-17 01:01:17