protected virtual void Awake() { if (controller == null) { controller = GetComponent <VRTK_ControllerEvents>(); } if (controller == null) { Debug.LogError("VRTK_WorldPointer requires a Controller that has the VRTK_ControllerEvents script attached to it"); return; } Utilities.SetPlayerObject(gameObject, VRTK_PlayerObject.ObjectTypes.Controller); headset = VRTK_DeviceFinder.HeadsetTransform(); playArea = VRTK_DeviceFinder.PlayAreaTransform(); playAreaCursorBoundaries = new GameObject[4]; }
private void Start() { if (movementTransform == null) { if (VRTK_OutlineObjectCopyHighliter.VRTK_DeviceFinder.HeadsetTransform() != null) { movementTransform = VRTK_OutlineObjectCopyHighliter.VRTK_DeviceFinder.HeadsetTransform(); } else { Debug.LogWarning("The VRTK_RoomExtender script needs a movementTransform to work."); } } cameraRig = VRTK_DeviceFinder.PlayAreaTransform(); additionalMovementEnabled = !additionalMovementEnabledOnButtonPress; if (debugTransform) { debugTransform.localScale = new Vector3(headZoneRadius * 2, 0.01f, headZoneRadius * 2); } MoveHeadCircleNonLinearDrift(); lastPosition = movementTransform.localPosition; }