playMaker

Author Topic: How to Make Pinch Action  (Read 2639 times)

avante2110

  • Playmaker Newbie
  • *
  • Posts: 5
How to Make Pinch Action
« on: April 29, 2016, 04:05:31 AM »
Hi! i'm UX Designer, and first of all, Im very sorry my poor Eng cuz im Korean.

i am making some action about multi touch with playmaker, like Pinch action,

but there is no action about Pinch caculate.

What i needed is Caculate between two finger touch distance, but when i make as playmaker, two touch bring too many delay.

example, when i touch began with two finger on the Galaxy Tab Screen at same time, not working both. just work solo finger touch. but Touch time about with little term, it was work Perfectly.

what's my problem? am i fix unity update frequency? or fix playmaker logic? i used some bool type, and Get touch info, set postion, etc...anyway, this delay still there. plz teach me about Pinch action or recommend Good Plug-in possible use with playmaker.


thx for your reading.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to Make Pinch Action
« Reply #1 on: April 29, 2016, 05:12:09 AM »
Hi,

 I would recommend using a dedicated asset for this, you have two main options:

EasyTouch, with build in PlayMaker Support:
https://www.assetstore.unity3d.com/en/#!/content/3322

Input.Touches
https://www.assetstore.unity3d.com/en/#!/content/3283
PlayMaker Support: https://hutonggames.fogbugz.com/?W961

 It's perfectly possible to do a pinch system just in PlayMaker, but requires some advanced concept and understanding:

- Store the TouchID to be able to track their position as the touches move on screen using TouchEvent with the begin phase.
- Track only 2 touch ( using getTouchEventInfo in every phase but begin) , and get their position, to compute the distance between them. that will be your pinch value.

Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to Make Pinch Action
« Reply #2 on: April 29, 2016, 05:22:19 AM »
Hi,

 There is also a dedicated action for this on the Ecosystem:

http://hutonggames.com/playmakerforum/index.php?topic=12145.msg57492;topicseen#new

 Bye,

 Jean