////////////////////////////////////////////////////////////////////////////////////////////////
		/*--------------------------------------------------------------------------------------------*/
		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>();
		}
예제 #2
0
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 public InputCursor(CursorType pType, InputSettings pSettings)
 {
     Type      = pType;
     vSettings = pSettings;
     Rotation  = Quaternion.identity;
 }
 ////////////////////////////////////////////////////////////////////////////////////////////////
 /*--------------------------------------------------------------------------------------------*/
 public InputCursor(CursorType pType, InputSettings pSettings)
 {
     Type = pType;
     vSettings = pSettings;
     Rotation = Quaternion.identity;
 }