Hi people, I have a doubt about the FPSInputController script. If you make a capsule, to be able to move, and rotate around, how do you manage your character’s animation?.
After I make the capsule, add everything the FPSInputController controller tells you to do, I add my character and make it child of the capsule. Now, the capsule responds to WASD, mouse look and jump. So… how can I make now so when I press W, the capsule moves AND the character walk animations plays just like it’s supposed to?
I tried with:
function LateUpdate () {
if (Input.GetKey ("w")){
animation.Play("WalkINPLACE");
}
}
Now, you can see that my animation’s name is WalkInPlace, because if the capsule is moving forward… then the animation has to occur on the same place right?
I just don’t thing this is the way it’s supposed to make this work.
Am I missing an important part here? Do I actually have to script every key, assing them to an animation and time the capsule movement with the animation or is there an easier way?
Thanks very much!
Mmmmm I will test it right away. I'll let you know, thanks!
– kevinseligmannWhenever I add the line -> public Transform mymodel; -> I get this error "Unexpected token: Transform." And when I add -> mymodel.animation["WalkINPLACE"] = WrapMode.Loop; -> It gives me this error "Property 'UnityEngine.Animation.Item' is read only." What's wrong here? (I'm working with Javascript if it's any help)
– kevinseligmann