// Start is called before the first frame update void Start() { Cursor.lockState = CursorLockMode.Locked; _povScript = GetComponent <ChangePOV>(); _uiControllerRef = GameObject.Find("UIController"); _inventoryScript = _uiControllerRef.GetComponent <ToggleInventory>(); }
// Start is called before the first frame update void Start() { _controller = GetComponent <CharacterController>(); _gravityScript = GetComponent <CharacterGravity>(); _cameraScript = GetComponent <PlayerCamera>(); _povScript = GetComponent <ChangePOV>(); _playerRef = transform.Find("Player"); _thirdPersonCamera = _cameraScript.ThirdPersonCamera; StopMovement(); }
void Start() { SetCameraTarget(target); vOrbitInput = hOrbitInput = zoomInput = hOrbitSnapInput = mouseOrbitInput = vMouseOrbitInput = 0; MoveToTarget(); collision.Initialize(Camera.main); collision.UpdateCameraClipPoints(transform.position, transform.rotation, ref collision.ajustedCameraClipPoints); collision.UpdateCameraClipPoints(destination, transform.rotation, ref collision.desiredCameraClipPoints); transform.position = destination; previosMousePos = currentMousePos = Input.mousePosition; ChangePOV changePOV = new ChangePOV(); }