Question about MouseLook script

Hi!

I have a question about the MouseLook script. I was using the Inspector to modify public vars like the max angle X and Y while playing in the Island default project. I just switched off the script to see what would happen (with the checkbox within the Inspector).

I thought it would just freeze everything as the script controls the X and Y mouse axis. It actually only disabled the X axis… I changed the Axes var (MouseXandY, MouseX, MouseY), but it’s still the same. I really don’t understand at all ! If someone could explain it would be very nice :wink:

Thanks!

I just found the answer : there are two MouseLook scripts, one for the FirstPerson Player (which controls X axis) and another one for the Main Camera (which controls Y axis). So I just disabled both and it works !

I had to disabled MouseLook X and Y for another script which is attached to FirstPerson Player so I used in C# :

MouseLook[] mouseLooks = GetComponentsInChildren<MouseLook>();
foreach (MouseLook mouseLook in mouseLooks)
{
mouseLook.enabled = false;
}