- Home /
Animation Issue with Custom Character and 3rd Person Controller
Hello. Here's the deal. I created my own character in Blender, and it includes a mesh, rigging, and animations (it all works well in Blender). I then exported it all to Unity as a .FBX file. I gave my character Unity's pre-made 3rd person controller and got him to move, and then made him an animator with idle and walking animation (with transitions between them).
However, when I play my character and move forward, the idle animation continues to loop, as if I never included the walking animation. I tried following the tutorial on Mecanim animation, located at http://www.youtube.com/watch?v=Xx21y9eJq1U , but the problem inexplicably persisted.
Additionally, I noticed that the animation preview had the character actually moving in the tutorial, while mine just animated in place (again, only in the preview).
Does anyone have a clue what's going on? I've been banging my head on this for days.
Ok, I just figured out what the problem is (not that I know the solution). In my animator, one of my parameters is Speed, but when my character walks forward, the variable doesn't change. Does anyone know what parameter I should use in order to access the speed variable in the standard 3rd person controller script?
Answer by mcconrad · Aug 22, 2013 at 06:53 PM
i figured this out after several hours of bashing my head against the keys. the tutorial assumes you are using rigid bodies and not character controllers. so to make the animations work like in the mechanim unity video you have to turn off the character motor script (though for some giggles leave it on at first) and add a rigidbody component, as well as the scripts HashID & PlayerMovement. and also tag the object as GameController not Player. and some of the inputs like "sneak" and "attach" need to be keymapped.
you can keep the standard 3rd person controller on as long as the controls don't conflict (aside from "jump" mine were fine as is). that way you can add animations from the tutorial and still have the controls you were used to.
Ah yes, thank you. When I posted this, I was such a complete newbie that I didn't even realize I needed a character controller. Ha. I didn't know it expected a rigidbody though; that's good to know.
Your answer
Follow this Question
Related Questions
John Lemon Popping While Walking 0 Answers
How to make character controller forward jump a certain distance? 1 Answer
Animating CharacterController When Stepping Up 0 Answers
Weird animation behaviour - Lu character 1 Answer
Sub animations 0 Answers