////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		public void Awake() {
			var sett = new InputSettings();
			sett.InputTransform = gameObject.transform;
			sett.CameraTransform = HeadsetCameraTransform;
			sett.CursorSize = CursorSize;
			sett.UseMouseForTesting = UseMouseForTesting;
			sett.MousePositionMultiplier = MousePositionMultiplier;
			
			if ( HeadsetCameraTransform == null ) {
				IsFailure = true;
				throw new Exception("The "+typeof(HovercursorLookInput)+" component "+
					"requires the 'Headset Camera Transform' to be set.");
			}

			vCursor = new InputCursor(CursorType.Look, sett);
			vPlaneStates = new CacheList<PlaneState>();
		}
Ejemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Awake()
        {
            var sett = new InputSettings();

            sett.InputTransform          = gameObject.transform;
            sett.CameraTransform         = HeadsetCameraTransform;
            sett.CursorSize              = CursorSize;
            sett.UseMouseForTesting      = UseMouseForTesting;
            sett.MousePositionMultiplier = MousePositionMultiplier;

            if (HeadsetCameraTransform == null)
            {
                IsFailure = true;
                throw new Exception("The " + typeof(HovercursorLookInput) + " component " +
                                    "requires the 'Headset Camera Transform' to be set.");
            }

            vCursor = new InputCursor(CursorType.Look, sett);
        }