playMaker

Author Topic: Touch to Send Mouse Input?  (Read 2340 times)

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Touch to Send Mouse Input?
« on: April 28, 2016, 01:07:39 PM »
I have read numerous threads on this but I'm not sure exactly whether Playmaker has what I need built-in or I need to purchase additional assets.

I have a setup which uses some scripts to orbit the camera around a hero object. 

1.  When the user drags the R-mouse button... the camera orbits around the hero object.

2.  When the user scrolls the mouse wheel... the camera zooms in or out.

3.  When the user drags the M-mouse button... the view target moves thus panning the camera.


Now I want to implement touch controls to do these same things and it would be easiest if the touch could simply send mouse input.  I would like to have a finger drag send the R-mouse input.  I would like to have a pinch send the mouse-wheel input.  I would like to have a two-finger drag send the M-mouse.

Are these all possible with the standard Playmaker tools or should I look at something like Easy Touch for this?

Thanks for any ideas!

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Touch to Send Mouse Input?
« Reply #1 on: May 02, 2016, 02:14:22 PM »
Any ideas on this?

I need to send mouse events with touch.  Can Easy Touch do this?  Can other assets do this?

Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Touch to Send Mouse Input?
« Reply #2 on: May 04, 2016, 03:23:57 AM »
Hi,

 Easytouch will certainly help you achieve more complex touch and mouse behavior, but really the thing to do here is to account for both,

in your fsm, account for mouse and touch, typically having one state catching both mouse and touch, but reidrect to different logics to handle touches and mouse distinctivly. You can't simulate a mouse using touches.

Bye,

 Jean

mTruly

  • Junior Playmaker
  • **
  • Posts: 98
Re: Touch to Send Mouse Input?
« Reply #3 on: May 04, 2016, 11:50:50 AM »
Thanks very much for the info!

I am using an asset from the Asset Store to do something and this asset is only setup to use mouse input.  It is working fine but doesn't accept touch input.  That's why I was trying to get touch to send mouse input.

As my coding skills are nil... I will probably have to look for another asset which accepts both mouse and touch input.

Thanks again.

ransomink

  • Playmaker Newbie
  • *
  • Posts: 44
Re: Touch to Send Mouse Input?
« Reply #4 on: May 04, 2016, 05:55:43 PM »
You can use PlayMaker to setup touch input since that asset only does mouse input; then you'll have both inputs working. Easytouch is great and will make setting up touch input, well, easier using PlayMaker...

They have youtube videos detailing and explaining how touch input works...

iOS Fundamentals
https://www.youtube.com/playlist?list=PLD8AAC983AAD87D01