0

Get multiple fingers touch

Alessandro 2 years ago updated 2 years ago 4

Hello Bolters!
I'm trying to adapt my trusty "get touch" macro so that it recognises simultaneous touches, at the moment it only recognises one touch at a time.
I would prefer bolt native solutions instead of using third party plug-ins as I'm trying to understand Bolt fully, so integrating lean touch or other would be a last resort, sure this can be done in Bolt only.
My current macro:

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

I'd think this would be extremely easy as it's setup already. Add an input of integer. Default to 1. Attach to Get Touch.

If you meant something like the below, it returns an "index out of bound" error every time I set the integer to anything but 0.

I found a script that might help me (https://www.binpress.com/unity-3d-working-with-touch-input/) I will try to adapt it to my needs and see what comes of it, not sure i can as my scripting knowledge is quite basic.

A collection type always returns it's count as the actual amount, like say 3. But it's index is actually 2, since it starts at 0 counting up. So it should be 0 if there is one touch. 1 if getting second touch, ect. No need to change anything but using the count minus 1.

Hi,
I tried the above, but I still don't seem to be able to build a flow that recognises multiple touches at once, could you point me in the right direction?
(Not asking to do the job for me).
In my mind it should work like this:

Get touches (should return a list)

Get list count (to get the number)

For each (number above) do a series of actions.


BUT each further simultaneous touch is just not recognised...