private void OnLoadedSetupChange(VRTK.VRTK_SDKManager sdkManager) { // Set up the network tracking objets leftController = sdkManager.loadedSetup.actualLeftController.transform; rightController = sdkManager.loadedSetup.actualRightController.transform; head = sdkManager.loadedSetup.actualHeadset.transform; }
private void OnLoadedSetupChange(VRTK.VRTK_SDKManager sdkManager, VRTK.VRTK_SDKManager.LoadedSetupChangeEventArgs e) { if (isLocalPlayer) { VRTK.VRTK_SDKManager.instance.loadedSetup.actualBoundaries.transform.SetPositionAndRotation(transform.position, transform.rotation); OnLoadedSetupChange(sdkManager); } }
override public void OnStartLocalPlayer() { base.OnStartLocalPlayer(); Debug.Log("Setting up local player"); VRTK.VRTK_SDKManager sdkManager = VRTK.VRTK_SDKManager.instance; if (sdkManager.loadedSetup != null) { VRTK.VRTK_SDKManager.instance.loadedSetup.actualBoundaries.transform.SetPositionAndRotation(transform.position, transform.rotation); OnLoadedSetupChange(sdkManager); } // Local color leftControllerRender.GetComponent <MeshRenderer>().material.color = Color.red; rightControllerRender.GetComponent <MeshRenderer>().material.color = Color.red; headRender.GetComponent <MeshRenderer>().material.color = Color.blue; leftControllerRender.GetComponent <MeshRenderer>().GetComponent <Collider>().enabled = false; rightControllerRender.GetComponent <MeshRenderer>().GetComponent <Collider>().enabled = false; headRender.GetComponent <MeshRenderer>().GetComponent <Collider>().enabled = false; // Set player's layer (Controls bounding box) sdkManager.GetComponentInChildren <VRTK.VRTK_BasicTeleport>().GetComponent <VRTK.VRTK_PolicyList>().identifiers.Add(LayerMask.LayerToName(playerLayer)); }
protected virtual void Instance_LoadedSetupChanged(VRTK.VRTK_SDKManager sender, VRTK.VRTK_SDKManager.LoadedSetupChangeEventArgs e) { persistence.Load(); SetupGameData(); PostProcessControl.Instance.GameIsReady(); }