playMaker

Author Topic: Touch to Mouse Input Converter  (Read 3947 times)

theBrandonWu

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
    • Studio Pepwuper
Touch to Mouse Input Converter
« on: May 03, 2011, 12:09:23 PM »


I made a FSM to convert touch input into mouse input in my project so that it will work on my Mac and iPhone at the same time. Just drop the prefab into your scene, or create a GameObject, add FSM, and paste the template in the .asset file.

Download link: http://ge.tt/57U7eII

Basically, when a user touches the screen (Touch Began), this FSM will send a MOUSE DOWN event to the object touched, and send a MOUSE UP event to the object touched when the user lifts his/her finger (Touch Ended).

:)

Studio Pepwuper: http://www.pepwuper.com
One Month Game School: http://www.onemonthgameschool.com/

Duffdaddy

  • Junior Playmaker
  • **
  • Posts: 54
    • View Profile
Re: Touch to Mouse Input Converter
« Reply #1 on: May 03, 2011, 01:49:13 PM »
Nice, I'll make use of that. Thanks!

Keefus

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Touch to Mouse Input Converter
« Reply #2 on: June 14, 2011, 03:37:06 PM »
This is really great thanks, would it be possible to convert this for multi-touch use? I tried duplicating the FSM and using a different finger ID but it did'nt work.

Thanks again.