Transform & Pinned transform gestures on same object

Ask for help and post bugs.

Transform & Pinned transform gestures on same object

Postby ireth86 » Wed Dec 20, 2017 5:58 pm

Hello,

I would like to handle my hypothetical object using two gestures (not simultaneously):
- Transform gesture, for scaling the object with two touches
- Pinned transform gesture, for rotating the object with just one touch

I added them both to the object and set up some limits about pointers and stuff.
Maybe I'm missing something obvious, but it is working only the gesture whose component is first into the gameobject.
(e.g. object has PinnedTransformGesture as first component, and TransformGesture as second component --> I'll be able only to rotate it)

Thanks in advance for any help.
ireth86
 
Posts: 14
Joined: Wed Sep 28, 2016 5:55 pm

Re: Transform & Pinned transform gestures on same object

Postby valyard » Fri Dec 22, 2017 6:34 pm

Hm. This should work if Transform gesture has the limit of minimum 2 pointers and Pinned Transform gesture has the limit of maximum 1.
valyard
Site Admin
 
Posts: 439
Joined: Mon Sep 08, 2014 11:57 pm

Re: Transform & Pinned transform gestures on same object

Postby ireth86 » Thu Jan 04, 2018 2:22 pm

Hi @valyard,
thanks for your answer and sorry for the very late reply.

I tried your solution into an empty scene, with just one cube on which I applied the gestures, but as I said it's not working.
You can find the screenshot of the gestures attached to the cube. The "original" limits were even more strict ( [2:2] for the Transform, and [1:1] for the Pinned ).
I'm using Unity 2017.2.0f3.

Thank you again.

### EDIT ###
I noticed that maybe I didn't explained myself properly.
The gestures are both recognized, since I can see my debug prints when the "Transformed" events are raised.
But I will *see* something on my cube (a rotation or a scale) only for the first gesture in the inspector.
Attachments
touchscript.JPG
touchscript.JPG (37.94 KiB) Viewed 1390 times
ireth86
 
Posts: 14
Joined: Wed Sep 28, 2016 5:55 pm

Re: Transform & Pinned transform gestures on same object

Postby ireth86 » Wed Jan 10, 2018 7:29 pm

Still no luck.

I can manage to make it work by manually handling the scale or the rotation.
But I'm really curious to understand if I'm making some kind of mistake, since you confirmed me that it should work.
ireth86
 
Posts: 14
Joined: Wed Sep 28, 2016 5:55 pm

Re: Transform & Pinned transform gestures on same object

Postby valyard » Sun Jan 14, 2018 1:20 pm

Can you send me this test project? Maybe there's some kind of a bug there, or I just don't fully understand the problem.
valyard
Site Admin
 
Posts: 439
Joined: Mon Sep 08, 2014 11:57 pm

Re: Transform & Pinned transform gestures on same object

Postby ireth86 » Mon Jan 15, 2018 11:33 am

Hi @valyard,
I just sent you the link via PM.
ireth86
 
Posts: 14
Joined: Wed Sep 28, 2016 5:55 pm


Return to Help and Bugs

Who is online

Users browsing this forum: Baidu [Spider] and 0 guests