playMaker

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

Kubold

  • Full Member
  • ***
  • Posts: 112
[Solved] Get Animator Current State Info - wrong output?
« on: April 09, 2014, 10: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, 03:17:34 AM by Kubold »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Get Animator Current State Info - wrong output?
« Reply #1 on: April 14, 2014, 08: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

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