Mouse looking combined with head bob animation. And key input to play animation (442798)

Hi guys.

Im trying to animate the camera on the first person controller(for a head-bob effect), but when i change the rotation values on the camera it stops me looking on one of the axis (like not being able to look up and down). is there any way that i can animate the camera’s rotation without it effect the mouse look. (i used the unity animator btw)

i was also wondering if use would also know how i could play an animation by pressing a key on the keyboard example: pressing ‘w’ will make you walk but it also plays the camera animation for head-bob.

thank you, if anyone can help me with this problem it is very much appreciated.

Dylan

p.s.

i dont want to use that head-bo script, because i would prefer to have it animated so it looks the way i want it to.

bump. please guys i really need help with this it’s really stumping my project