playMaker

Author Topic: [Solved] Get Animator Current State Info - wrong output?  (Read 739 times)

Kubold

  • Junior Playmaker
  • **
  • Posts: 99
    • View Profile
[Solved] Get Animator Current State Info - wrong output?
« on: April 09, 2014, 07:15:56 AM »
Hello!

"Get Animator Current State Info" instead of giving me current State name, gives me Base Layer's name. I thought it will give me the name of the current State node playing...?

Not sure if it is a bug, or I misunderstood what State is. Anyway, I need to be able to tell PlayMaker which mecanim node (which state/blendtree) is currently being played. It seems this action should do it, but in the "State Name" variable it just says "Base Layer 0" all the time.

Thanks!
« Last Edit: April 23, 2014, 12:17:34 AM by Kubold »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Get Animator Current State Info - wrong output?
« Reply #1 on: April 14, 2014, 05:07:15 AM »
Hi,

 yeah, I am not too sure myself why, typically, I use instead the action "GetAnimatorCurrentStateInfoIsName" where I can then properly compare it with say  "Base Layer.FullJump".

 in the mecanim example you can see that in action in the prefab "Character PlayMaker TargetMatch" fsm "Target match" in example "Target Match PlayMaker".

bye,

 Jean

Kubold

  • Junior Playmaker
  • **
  • Posts: 99
    • View Profile
Re: Get Animator Current State Info - wrong output?
« Reply #2 on: April 23, 2014, 12:17:07 AM »
Ok, thanks! That's a reasonable workaround, maybe even better.