- Home /
ThirdPersonController Script doesn't use animations on model imported from Blender
Hi I'm pretty new to Unity and have seen a few tutorials / forum posts on how to animate a model in Unity.
I've imported the ThirdPersonController and camera scripts so the camera follows my model around the scene. However even after attaching the animations to the Idle / walk / run / jump animation variables in the script I get the error:
Ignore only left for context Please assign a target to the camera that has a ThirdPersonController script attached. /ignore
The character you would like to control doesn't have animations. Moving her might look weird.
I know this error comes from the script itself but I don't know what more I have to do so the script knows the animations are attached.
I know the animations work because I saw a different post that talked about making an animation controller. I made one and added the animations to that. When I set one as default the model does that continuously when I start the scene. I just can't get it to work on the default script.
If you need more information to help me please let me know as this has been driving me mad!
Hi, i hven't used the 3rd personcontroller so far, but from what i assume how it works you have to add the 3rd person controller script to your camera then in the scene view select the camera and on the right where you can see the script attached should be a missing reference, drag and drop the gameobject which should be followed by the camera there
To be honest I ballsed up the question a bit!
The main issue I'm having is the animations and the error I'm getting is:
The character you would like to control doesn't have animations. $$anonymous$$oving her might look weird.
I get that other error too but its not the one I wanted to ask about :/
Does your gameobject have a animation component in scene view? You normally don't have to assign the animations in script. You can add them to a animation component in scene view and then call them by their name in script like: animation.Play("walk");
In scene view the gameobject shows the script as a component, it has animator as a component but not animation and in the script it creates variables like:
public var jumpPoseAnimation : AnimationClip;
so you can assign the animation to Jump Pose Animation in the third person controller component
Answer by BPR · Apr 21, 2013 at 08:03 AM
Ok i think i get it now, you want to use a custom model with the 3rd person controller, right? First make sure that you export your charater in Blender with animations and sceleton, i recommend exporting to .FBX format since unity (slowly) converts all meshes to this anyway. Then drag and drop the fbx file to your project view, select the now imported mesh and in the inspector scroll down until you see Animations, check split animations and add the name, start frame and endframe for each animation. Name your animation slightly diffrent from the standart third person controller scripts in order to avoid confusion for example walk1, idle1, etc. For walk, run and idle animations select "Loop" under wrapmode, apply the changes and drag and drop your mesh into the scene view. It should already an animation component, add a character controller component and the third person controller script and third person camera script. In the third person controller script select the missing animations by clicking on the little dot on the right after each missing clip. And in third person camera script under camera transform select your main camera. Now you should be able to enter play mode and walk, run and jump around.
Regards BPR
Yeah thats what I want to do, it all looks similar to what I did apart from the FBX format. I'll give it a go and update this when its done. Thanks!
I've done that but get the same effect, the animations are loaded into the third person controller but don't actually trigger :/
Your answer
Follow this Question
Related Questions
Blender Animation Looping Delay Problem 2 Answers
hypercube animation 2 Answers
Generic root motion jitter? 0 Answers
FPS Bow Animation 0 Answers