Unity 3D, Animation stops Mouselook Y-Axis from working.

Hi, i’m trying to play a Walking animation and an Idle animation. When “w” is pushed it plays walk else it plays idle. I’m having a problem though, the animation works fine, but it stops me from looking up and down ingame, any help would be kind thanks!

StreamlineGames.

#pragma strict



function Update () {
    if (Input.GetKey("w"))
        animation.CrossFade("Walk");
    else
        animation.CrossFade("Idle");
}

This might be the same issue as described here:

How to rotate a bone during an animation?

Hopefully, this answers your question.
You need to read a bit through to the bottom to get it. But it seems like a common problem that can solved easily once you get the logic of it.

[EDIT] It just came to my mind that the solution mentioned above only applies to the situation where you’re trying to rotate bones with your mouse. However, if your mouse look script is only affecting the camera, things might be different! It depends on your situation.