Newbie: Multitouch

View previous topic View next topic Go down

Newbie: Multitouch

Post  Beren77 on Sun Feb 15, 2009 5:05 am

Hi,

I am trying to determine, if the user has one or two fingers touching the iPhone/iPod touch. So far, all I get is an event in "templateScreenTap" or "templateScreenTouchMove" respectively. When I now read sio2 -> _SIO2window -> n_tap, I seem to get the number of "clicks" performed and when I read sio2 -> _SIO2window -> n_touch, I always get 1, no matter if one finger touches the screen or two and no matter if I run the program in the simulator or on the device. Is this a bug or do I need to tell SIO that I'd like to receive information on multi touch events? How would I do this?

I have taken a look at the tutorials and the emitter tutorial (sorry, forgot the number!) seems to use the n_tap/n_touch field, but I couldn't use the feature; i.e. no difference if I touch the screen with two fingers or one...

Thanks for any help! Smile
Philipp

Beren77

Posts : 2
Join date : 2009-02-15

View user profile

Back to top Go down

Re: Newbie: Multitouch

Post  sio2interactive on Sun Feb 15, 2009 5:13 pm

Check tutorial05 for more info but..., by default application can receive a single touch only, you need to enable multi touch in your application by calling:

[ self setMultipleTouchEnabled:YES ];

inside initWithCoder or other appropriate location...
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Newbie: Multitouch

Post  Beren77 on Sun Feb 15, 2009 11:59 pm

Aah! I thought that I had missed some obvious setting. Thanks! That settles the problem.

Beren77

Posts : 2
Join date : 2009-02-15

View user profile

Back to top Go down

Re: Newbie: Multitouch

Post  matthew on Mon Feb 16, 2009 12:10 am

Out of curiosity, after enabling multi-touch, is it possible for sio2 to recieve multi-touch events.

I thought sio2 was hard coded to 1 finger gestures Smile
.
--matthew

matthew

Posts : 64
Join date : 2008-11-12

View user profile

Back to top Go down

Re: Newbie: Multitouch

Post  sio2interactive on Mon Feb 16, 2009 12:59 am

Checkout the latest revision on SVN... It support 5 (default) simultaneous touch and events callback (and more if you increase the number...)
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Newbie: Multitouch

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum