playMaker

Author Topic: Using playMaker and FingerGestures  (Read 10922 times)

vonchor

  • Guest
Using playMaker and FingerGestures
« on: November 13, 2011, 09:10:58 AM »
If you want to use FingerGestures along with playMaker this modded file will do the trick for the Toolbox functions. The Toolbox provides drag, tap, swipe, and other basic functionality. Instructions for use are embedded within the file so read it before trying to do anything.

PLEASE NOTE:

0. This code was released with the permission of William Ravaine, creator of FingerGestures.
1. You need to purchase FingerGestures from the asset store to use this file (well sort of obvious :-)
2. this is unsupported by the creator of FingerGestures and/or by me.
3. Uhh, I don't remember (a USA political joke)
4. There is no number 4 (a Monty Python joke)
5. This is probably a temporary solution as there may be "official" PM<->FG support one day.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14059
  • Official Playmaker Support
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #1 on: November 13, 2011, 10:17:15 PM »
Hi,

 Excellent! Thanks for sharing. Code is interesting, really have to learn how to work with Types.

Bye,

 Jean

MaDDoX

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 165
    • View Profile
    • FluidPlay Studios
Re: Using playMaker and FingerGestures
« Reply #2 on: November 16, 2011, 11:16:29 PM »
Very nice Vonchor, I'll check it out as soon as I get some.. time.. hmm.. when will that ever happen? :o RageTools development is really chewing up my time like crazy! But I might get an excuse to try this as I build the RageText web demo ;)
--
Breno "MaDDoX" Azevedo
@brenoazevedo

Andrew.Lukasik

  • Full Member
  • ***
  • Posts: 134
    • View Profile
    • my twitter @andrewlukasik
Re: Using playMaker and FingerGestures
« Reply #3 on: November 18, 2011, 01:48:54 PM »
Thanks a lot!

A.

soofaloofa

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #4 on: November 30, 2011, 10:45:45 AM »
I'm having trouble registering for these events in my FSM. Do you have a quick tutorial on how to get started?

Thanks!

vonchor

  • Guest
Re: Using playMaker and FingerGestures
« Reply #5 on: December 07, 2011, 10:40:47 AM »
no, there's no tutorial. You just set the fields in the script using Unity's inspector. Set the GO, FSMName, and FSMEvent. The event has to be a global event (I think). Be sure that the Fsm_mode checkbox is on. There's no "registration" concept at all.

Microike

  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 8
  • Giorgio
    • View Profile
    • Microike
Re: Using playMaker and FingerGestures
« Reply #6 on: January 25, 2012, 05:16:25 AM »
VERY nice .tks
Giorgio

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #7 on: February 07, 2012, 10:06:39 AM »
Well i made my own simple touch system but it was just not reliable for some reason.. So here we go. Lets give this a try. Hoping for awesome things..

Thanks for this helper!!!

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #8 on: February 07, 2012, 09:34:09 PM »
Wouldn't you know that what i want to do is not really straight forward... figures.. Oh well got some help on the main forum. I think it will work out but used work around for now.

I may make a little tutorial for this as i had absolutely no idea how to get this thing working.. Not the PM part but Finger Gestures.. Still not quite clear actually. After my holidays...

Q

Mark_T

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 72
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #9 on: February 16, 2012, 03:01:46 PM »
Wouldn't you know that what i want to do is not really straight forward... figures.. Oh well got some help on the main forum. I think it will work out but used work around for now.

I may make a little tutorial for this as i had absolutely no idea how to get this thing working.. Not the PM part but Finger Gestures.. Still not quite clear actually. After my holidays...

Q

I didn`t bought FingerGestures yet, but I`ll be really happy for a tutorial to see what is possible with Playmaker. There is also a FingerGestures forum here: http://www.fatalfrog.com/?page_id=474&mingleforumaction=viewtopic&t=2. maybe with some more demanding we might get official support. :)



Mark_T

  • 1.2 Beta
  • Junior Playmaker
  • *
  • Posts: 72
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #10 on: February 16, 2012, 03:03:25 PM »

And vonchor, many thanks for your contribution!


vonchor

  • Guest
Re: Using playMaker and FingerGestures
« Reply #11 on: February 16, 2012, 05:50:10 PM »
You're welcome. Actually at this point I'm using EZGUI and not FingerGestures. Not that there's anything wrong with FingerGestures, I just found that the combo of EZGUI and SpriteManager2 provides functionality I was going to add on top of FingerGestures; and I don't believe in reinventing the wheel so I paid the $ and made the transition.

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #12 on: February 20, 2012, 08:46:11 PM »
Well holidays are done and back to the grind.... I tried to get Finger Gestures to do what i wanted and no luck so far.. I have a few leads to check up on with the main forum. My issues are with tracking and controlling if i have a touch on an object or a swipe on the screen over top of it or a pinch for zoom.. But still hoping for good things.

I built a pinch with PM but found it was not very consistent in how it updated for some reason.

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #13 on: February 26, 2012, 09:42:33 AM »
Ok i have FG doing everything that i needed.... totally thanks to Vonchor's mod!! thanks!!!

I modified a bunch of the scripts and they are working great for me.. Nor sure if i am breaking any rules by what i did but it works.. Yeaaaaaa

Q

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
    • View Profile
Re: Using playMaker and FingerGestures
« Reply #14 on: February 26, 2012, 08:30:49 PM »
Ok i had this working just fine.. I was working in one Scene and building tests to my iPad.. worked perfect..

Then i did a full build with my main menu scene as well.. Now i get this error.. It seems to be an error when the FG tries to send the event to PM.. Any ideas on this? Why the difference between two scenes and just one? I assume something is not loading properly so it can not get a reference to it.. But i don't know how to fix it.. was supposed to send a full project an hour ago of course but he is running with the one scene instead.


NullReferenceException
  at HutongGames.PlayMaker.Fsm.SendEventToFsmOnGameObject (UnityEngine.GameObject gameObject, System.String fsmName, HutongGames.PlayMaker.FsmEvent fsmEvent) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEventTarget eventTarget, HutongGames.PlayMaker.FsmEvent fsmEvent) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Actions.SendEvent.OnEnter () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.FsmState.OnEnter () [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.EnterState (HutongGames.PlayMaker.FsmState state) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.DoTransition (HutongGames.PlayMaker.FsmTransition transition, Boolean isGlobal) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.ChangeState (HutongGames.PlayMaker.FsmEvent fsmEvent) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.Event (HutongGames.PlayMaker.FsmEvent fsmEvent) [0x00000] in <filename unknown>:0
  at HutongGames.PlayMaker.Fsm.Event (System.String fsmEventName) [0x00000] in <filename unknown>:0
  at TBComponent.Send (.Message msg) [0x00000] in <filename unknown>:0
  at TBFingerDown.RaiseFingerDown (Int32 fingerIndex, Vector2 fingerPos) [0x00000] in <filename unknown>:0
  at TBInputManager.FingerGestures_OnFingerDown (Int32 fingerIndex, Vector2 fingerPos) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) FingerGestures/FingerDownEventHandler:invoke_void__this___int_Vector2 (int,UnityEngine.Vector2)
  at FingerGestures.RaiseOnFingerDown (Int32 fingerIndex, Vector2 fingerPos) [0x00000] in <filename unknown>:0
  at FingerGestures.PerFinger_OnDown (.Finger source) [0x00000] in <filename unknown>:0
  at (wrapper delegate-invoke) FingerGestures/Finger/FingerEventDelegate:invoke_void__this___FingerGestures/Finger (FingerGestures/Finger)
  at FingerGestures+Finger.PostUpdate () [0x00000] in <filename unknown>:0
  at FingerGestures.UpdateFingers () [0x00000] in <filename unknown>:0
  at FingerGestures.Update () [0x00000] in <filename unknown>:0
  at TouchScreenGestures.Update () [0x00000] in <filename unknown>:0
 
(Filename:  Line: -1)