so i’ve got a script for locking my camera while the menu is open… problem is that it “Occationally” and yes… it really is only occationally which is why i’m completely lost here, locks the vertical look but not the horizontal look when i exit the menu again. The thing that throws me off is that sometimes it works just as it should but every other time it just keeps the vertical look locked down.
any thoughts?
#pragma strict
public var menu1 : UnityEngine.Canvas;
public var cam1 : Camera;
function Start () {
}
function Update () {
if (menu1.enabled == true )
{
cam1.GetComponent(MouseLook).enabled = !cam1.GetComponent(MouseLook).enabled;
}
}