Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: intrikit on September 19, 2013, 03:21:55 AM
-
Hello!
I've set up my state machine for my character as such:
(http://members.shaw.ca/session/playmaker_animation.jpg)
However, the animations associated to the states do not play. The Play Animation action greys out when the button is pushed. Any suggestions would be appreciated.
Thanks
-
How are your characters animation import settings? I don't see any anim name specified. Legacy?
-
My character's rig was set to Humanoid. As were the animations. Then I got some errors saying that the animations needed to be set to Legacy. So I set both my character and the animations both to Legacy and with Store in Root. The errors went away and the Play Animation action in Playmaker was no longer greyed out but the animations still won't play..
-
In the screenshot Anim Name is set to None. Are you setting the names of the animations to play?
-
Yes. I've made sure I set it to one of the animations in the animation list. It just so happened that it was set to "none" when I took the screenshot.
The states are applied to a game object though, not the actual character object. And the character is a child of the game object. Might that cause a problem?
-
That shouldn't be a problem as long as you're targeting the right game object in the Play Animation action.
Do the animation names appear in the browse popup next to the Anim Name field?
-
Yes they do. Each time I add an animation to the Animation component of the character, the Anim Name field updates properly. My character should be good to go. It's rigged properly and I've applied animations to it via the Animator in Unity and it works.
-
To try and debug this:
Add a new state with just the Play Animation action targeting the child object and make it the Start state. When you hit play does it play the animation?
If it does, then most likely something in the flow of your FSM is broken. E.g, the animation is playing but then another state is immediately stopping it, or playing a different animation...
-
Tried that... still won`t work! I must be missing some setting inside Unity.. I appreciate your replies!
Also, I am playing animations that I`ve either purchased or the ones that come free from Unity`s sample packages. I wonder if that is an issue.
-
Hi,
have you tried with other animations? ones that comes free?
bye,
Jean
-
Yes i`ve tried with about two or three other animations but none work. I actually also tried to apply the same FSM to the original model the animations are associated with and they also do not work...
-
uhm..
can you start a fresh projects? if that still doesn't work, it's likely a setting you miss in general.
bye,
Jean
-
I started a new project and still.. no luck.
-
Does the animation play if you set it as the Animation in the Animation Component and check Play Automatically?
-
Hi,
Can you share that fresh project? pm me, and I'll have a look.
bye,
Jean
-
No it does not play.
-
How are you making the animation? Have you made other animations that work in unity? It sounds like you might have art pipeline issues to figure out...
-
The thing is, I haven't made animations myself. I modelled and rigged the character, but I assumed that I could just use either free or purchased animations, which is what I've been doing. They do work properly whenever I add an Animator component to my character and throw in an animation in the state machine in Unity..
-
Did you pm Jean the project? I'm not sure we're going to get any further without looking at your setup...
-
Yes I did! I appreciate your help. You guys are awesome.
-
Hi,
Yes, I have it. Allow me somew time, I am in catch up mode... Please bump me beginning of next week if you haven't heard back from me, I would appreciate.
bye,
Jean
-
will do
-
Hi,
Ok, Something very important for anyone starting with Mecanim. It is quite a difficult beast to master properly for sure. So start in small incremental step and it's very important you read as much documentation as you can to get acquainted with the vocabulary and concepts. I had to go down that road too... :) You won't be able to hack Mecanim around...
animations can be of several types, if you start importing anims, you need to import them with type "humanoid" for them to be retargetable within mecanim. So select your anim, and in the "Rig" tab, pick "humanoid" for the animation Type, and click Apply.
Now that anim becomes possible to work with within your locomotion controller, and in states you can link now to that animation.
Bye,
Jean
-
does the Play Animation action not work with Mecanim? Are the custom actions listed in the wiki for the Mecanim package the only ones compatible with using Mecanim?
-
Hi,
No, "play animation" is to play regular legacy animations, not mecanim. and Yes, as far as I am aware, the wiki page on mecanim is the only package that will give you access to Mecanim features.
bye,
Jean
-
I see.. but we're talking animation-wise only, right? like, if i wanted to use Input actions that aren't listed in Playmaker Mecanim features, it will still work, correct?
I apologize these might seem like really basic questions but rest assured this stuff is all starting to make sense to me! ;D
-
Hi,
Not sure what you mean here. User Input and Mecanim are completly separated, it's the job of the developer to bind both, so I guess the answer is yes.
Mecanim is powerful, so yes, it takes a little while to understand it.
Bye,
Jean
-
thanks! yes i will watch all the videos.
i've been playing around with the actions and managed to get my player to walk, run, and face the proper direction in which it is heading. i attached a Smooth Follow Action to my camera to follow the character, however, with the Smooth Look At Direction Action, the camera also turns and faces the other way. This is supposed to be a side scroller so I want the camera to remain on the same side at all times. Any suggestions ?