Multitouch on GearVR? - unity3d

I understand that it's possible for a GearVR to distinguish between a "tap" and a "swipe". But is it possible to distinguish between a one finger tap and a two finger tap?

No, because the touchpad on the GearVR presents touches via the Mouse input:
Input.GetMouseButtonDown(0) / Input.GetMouseButtonUp(0)

Related

How to detect the circular Gestures on New Siri Remote 2nd Generation

I want to detect the action of rotate the wheel on the new Apple TV Siri Remote 2nd Generation.
Is there a way to know which direction clockwise or anti-clockwise?
How can i get the speed of rotation or any data related to this circular action?
Apple did not announce any new gesture recognizer for this new gesture, but you can implement it by yourself.
To do it you can use the GameController SDK that will allow you to get the absolute location of the user finger in the digitizer. Once you have the coordinates of the gesture location you can apply some trigonometry maths to detect if they are rotating the finger clockwise or anticlockwise.
I wrote a post with further details here:
https://dcordero.me/posts/capture_circular_gestures_on_siri_remote_2nd_generation.html

MRTK - how to implement a Touch Slider in Unity

As seen on a video of the HoloLens 2 presentation it is possible to have a pinch slider, a touch slider and also a push slider. Poorly there is only a prefab for a pinch slider and I can't get the slider to work also as a touch slider.
Which version of the MRTK was supporting the touch slider? Couldn't find any version >= 2.5.0.
How can I do this? I thought adding a NearInteractionTouchable script on the thumbRoot button would help but it does not.
If you want to adjust the value by poking with one finger in MRTK 2.7.2, please check out the TouchSliderExample.unity which is located at /MRTK/Examples/Experimental/TouchSlider/Scenes.

Windows, c++ detect finger touch on screen?

In virtual key codes in c++ vk_shift means the shift key for example. But is there any such code to indicate that a finger is touching the touchscreen ? Or how is it handled ?
There are two approaches. Either use Touch Input which will give you a very raw result in TOUCHINPUT, x-y point of the touch events, mostly useful for debugging purpose or if your app needs a unique interface, or Touch Gesture, which will be immediately familiar for users accustomed to other touch interfaces since you'll be handling GESTUREINFO, where you'll get tap, zoom, pan and rotation instead.

Simulating Multi Touch UIAutomation in Instruments on iOS device

Can someone point me in the right direction for how to simulate a multi touch tap in Instruments?
There are a few functions in which the number of touches is a parameter, but I don't understand how to actually define the coordinates of each touch.
For example, I need to simulate the user holding down a touch (or tap) at coordinate x1,y1 and x2, y2.
The application is not using standard accessible UI objects so I can only use coordinates.
I think the following should represent a held tap at specific coordinates, but it's only a single finger tap.
target.frontMostApp().mainWindow().scrollViews()[0].touchAndHold(1.7);
If you really need a two finger
Try performing a swipe action that doesn't move very far
target.frontMostApp().mainWindow().tableViews()[1].cells()[2].dragInsideWithOptions({startOffset:{x:0.0, y:0.1}, endOffset:{x:0.5, y:0.1}, duration:0.25});

how to detect direction of shake in iphone

I have an image of a bottle, whenever user shakes the device i want to move that image in that direction.
like up, down, left or right.
For example: if user is shaking the device in left direction i want to move that image in left direction.
i can detect shake event using
- (void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if(event.subtype==UIEventSubtypeMotionShake)
{/*some code*/} }
but i dont know how to detect the direction.
i dont even if this is possible or not.
please help me.
A shake is typically a back and forth movement. Use the accelerometer data to detect a sudden movement in one particular direction (e.g. left) or a tilt towards a different orientation.
You can get user motion values using CMMotionManager class.Please refer the following link
http://developer.apple.com/library/ios/#documentation/CoreMotion/Reference/CMMotionManager_Class/Reference/Reference.html#//apple_ref/occ/cl/CMMotionManager
Filter your acceleration and gyro dat detect direction of motion.