private void SetPlayerPresence() { if (pp == null) { pp = GetComponent <VRTK_PlayerPresence>(); } }
private void Awake() { if (this.GetComponent <VRTK_PlayerPresence>()) { playerPresence = this.GetComponent <VRTK_PlayerPresence>(); } else { Debug.LogError("The VRTK_TouchpadWalking script requires the VRTK_PlayerPresence script to be attached to the [CameraRig]"); } }
private void Start() { startScale = transform.localScale; playerPresence = GetComponent <VRTK_PlayerPresence>(); gravityMod = GetComponent <Alice_gravity>(); audioSource = GetComponent <AudioSource>(); findButton(); pointerThickness = pointer.pointerThickness; pointerLength = pointer.pointerLength; SetSize(Player.Sizes.Normal); ResizePointer(); gravityMod.SetScale(Player.currentSize); }
private void Awake() { if (GetComponent <VRTK_PlayerPresence>()) { playerPresence = GetComponent <VRTK_PlayerPresence>(); } else { Debug.LogError("The VRTK_TouchpadWalking script requires the VRTK_PlayerPresence script to be attached to the [CameraRig]"); return; } //註冊事件 touchpadAxisChanged = new ControllerInteractionEventHandler(DoTouchpadAxisChanged); touchpadUntouched = new ControllerInteractionEventHandler(DoTouchpadTouchEnd); controllerManager = GetComponent <SteamVR_ControllerManager>(); }