// Update is called once per frame void Update() { if (Input.GetKey(KeyCode.Escape)) { Cursor.lockState = CursorLockMode.None; } Turning(); InteractCast(); if (Input.GetButtonDown("Fire1")) { if (Time.timeScale == 1) { Cursor.lockState = CursorLockMode.Locked; } if (canInteract) { interactTarget.transform.GetComponent <Interactable>().Interact(); } else if (canPlace) { hands.Place(interactTarget.transform); } else if (canMove) { hands.Pickup(interactTarget.transform.GetComponent <Moveable>()); } else { hands.Drop(); } } }