Playmaker Forum
PlayMaker Updates & Downloads => Share New Actions => Topic started by: vonchor on November 13, 2011, 11: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.
-
Hi,
Excellent! Thanks for sharing. Code is interesting, really have to learn how to work with Types.
Bye,
Jean
-
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 ;)
-
Thanks a lot!
A.
-
I'm having trouble registering for these events in my FSM. Do you have a quick tutorial on how to get started?
Thanks!
-
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.
-
VERY nice .tks
-
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
-
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
-
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 (http://www.fatalfrog.com/?page_id=474&mingleforumaction=viewtopic&t=2). maybe with some more demanding we might get official support. :)
-
And vonchor, many thanks for your contribution!
-
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.
-
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
-
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
-
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)
-
I am told it is just a PM bug with Send Event.
Q
-
Hi Q,
Has the 1.3.3 beta fixed the NullReferenceException for you?
Thanks!
Alex
-
Ummm i have not tried it yet.. I was sidetracked to Max movie projects instead. But they end tomorrow.
How do i get the beta's again? I think i have it in an email somewhere.
I will let you know
Q
-
Hi,
This is very likely a problem when you reload the scene at runtime and send an event on a start state. It very much look like this bug ( that is likely fix in the current beta).
Bye,
Jean
-
This is good.. my plan is to upgrade to 3.5 this week with all the new assets. Hoping for good things.
Currently up with 12 month old barfing. not super fun. Oh well.
Q
-
If you are interested in the PlayMaker integration, please leave some comments/suggestions in on the FG forum thread here (http://forum.fatalfrog.com/index.php?topic=12.0). Thanks!
A quote from FingerGestures developer on his Unity forum thread (http://forum.unity3d.com/threads/95983-RELEASED-FingerGestures-Robust-input-gestures-at-your-fingertips!/page28).
-
Thanks i posted.
Q
-
Ok so my issues with FG and PM are gone with the new versions.. And the issues with loading scenes is also gone.. not sure where that post is at the moment... Yea..
Q
-
Can the smart people tell me why i cant use this code inside a PM Action?
Obviously i am not including the public class.. But just trying to insert that basic reference to the TapGesture Recognizer?
I am sure this is a basic scripting thing but i am not a scripter so i dont get it. ???
Q
using UnityEngine;
public class MyTapHandler : MonoBehaviour
{
// reference to our tap gesture recognizer object
public TapGestureRecognizer tapRecognizer;
void Start()
{
// register to the tap recognizer's OnTap event
tapRecognizer.OnTap += tapRecognizer_OnTap;
}
// our tap event handler method
void tapRecognizer_OnTap( TapGestureRecognizer source )
{
Debug.Log( "TAP detected at " + source.Position );
}
}
-
So i have no idea how to implement the code directly inside a PM action if it is even possible.. But i did manage to make a non TB-- FG script that sends messages to PM just like Vonchor's mod.
It works good i think.. seems to anyway.
Still more hurdles for me but getting there.
Q
-
You can register gesture recognizers in an action... your code actually looks fine. Did you have a Finger Gestures Initializer in your scene?
I think official Finger Gestures actions should be ready very soon!
-
Are you collaborating on something.... this would be awesome.. i am making good headway though.
Q
-
I just found William Ravaine has posted the first beta version for his FingerGestures actions. You can find more info in the new FingerGestures Actions for Playmaker (v0.1) (http://forum.fatalfrog.com/index.php?topic=48.0) thread.