playMaker

Author Topic: PlayMaker & Mecanim GET & "SET Animator Boolean" how to access the parameter ?  (Read 5976 times)

mickman

  • Junior Playmaker
  • **
  • Posts: 59
    • View Profile
Hi, 
   I'm trying to trigger a backflip animation on a humanoid character with a  2 finger tap on an iPad screen.

In Mecanim:   
I have an animation node called "backflip".  I have created a transition running from IDLE  to the backflip node that is trigged by a boolean parameter. 

In Playmaker:
I have created a touch screen manager that counts how many fingers touch the screen at any given time..
 1 finger tap = character walks to a location tapped.
 2 finger tap =  the character should do a backflip.
 
So my question is... How do I change the boolean parameter in Mecanim from false to true so the transition states  will fire and start the back flip animation ??

I've tried adding a " Set Animator Boolean " in Playmaker but I don't understand how to get access to the Mecanim transition parameter from within PlayMaker. 

I noticed Jeanfabre message at the beginning of IOS threads... he mentions the problem of Get and Set in realtion to developing for iOS apps...    hhmm.. perhaps this is part of my problem  ??

  Mick
« Last Edit: March 04, 2013, 02:08:50 PM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12417
  • Official Playmaker Support
    • View Profile
Hi,

 Sorry for the late reply :)

 you can find a fully working example here:

http://hutonggames.com/playmakerforum/index.php?topic=3590.msg16555#msg16555

 basically, it's within the animator graph that you plug the parameter with what anims it should play, you don't control transitions per say, you control animators' parameters instead.

when you create a transition, you set conditions for the transition to occur, and that's done using parameters.

Your starting point to learn how to work with animator is:

http://docs.unity3d.com/Documentation/Manual/AnimationStateMachines.html

Then once you understand that, setting the parameters in playmaker is only one action away really.

bye,

 Jean