Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: KellyRay on June 11, 2014, 11:27:39 AM
-
Maybe I am just dumb, but I can't seem to figure out how to get my events to trigger based on a finished animation like you can on the legacy animation actions.
Would be super cool to have that send event action on the animator side of things as well!
Thanks!
-
Hi,
ok, you need to do the following.
-- add a "PlayMakerAnimatorMoveProxy" to your gameobject with the animator on.
-- use the action GetAnimatorCurrentStateInfo and record the variable "Normalized Time", when it's above 1, it means it reached the end, above, it's looping basically.
I'll see if I can make a specific action for this that automatically do this work under the hood.
this is the unity way btw, as there isn't a callback yet (afaik) for when an animation is ended on a state.
Bye,
Jean
-
Thanks Jean,
I've gotten around the issue by adding a wait action and then typing in the length of the animation from the inspector properties. I wonder if there is a way to make that apart of the action?
Kelly
-
Hi,
yeah you could do that but that's hardcoded and would be difficult to maintain and prone to bugs, as 6 month down the line you'll change that anim and forget to update the fsm with th enew clip length. I would always strive to find a solution that will work by itself.
Also, keep watching for the up coming release of PlayMaker and my port of the Unity learn project "2d platformer", I am doing exactly the solution I proposed and it works well. I admit not as easy as an action drag and drop, I'll make an action for this ( I found what seems to be a good small framework to match an fsm state with mecanim states, that would be great if I can make that happen).
Bye,
Jean
-
Is there any update on this action?
-
Hi,
yes, I have done this actually, thanks for bumping this thread:
Download it on the wiki page (https://hutonggames.fogbugz.com/default.asp?W1031).
you can watch this video to see how it works
Bye,
Jean
-
Awesome! it works so perfect, exactly what I needed.
here is a link to the video, some reason my browser wont play your embeded version.
Thanks so much Jean,
-g
-
It's been a long time, I just want to know is this Animator Fsm State Sync feature still work? I can't find it in playmaker editor or scripts :'(