예제 #1
0
 public virtual void SetInputSource(SteamVR_Input_Sources newInputSource)
 {
     inputSource = newInputSource;
     if (controllerRenderModel != null)
     {
         controllerRenderModel.SetInputSource(inputSource);
     }
 }
 public virtual void SetInputSource(SteamVR_Input_Sources newInputSource)
 {
     inputSource = newInputSource;
     if (controllerRenderModel != null)
     {
         // Debug.LogError("hei set here " + newInputSource);
         controllerRenderModel.SetInputSource(inputSource);
     }
 }
예제 #3
0
 public virtual void SetInputSource(SteamVR_Input_Sources newInputSource)
 {
     inputSource = newInputSource;
     if (renderModel != null)
     {
         renderModel.SetInputSource(newInputSource);
     }
 }
예제 #4
0
        //-------------------------------------------------
        // Gets called when the hand has been initialized and a render model has been set
        //-------------------------------------------------
        private void OnHandInitialized(int deviceIndex)
        {
            //Create a new render model for the controller hints
            renderModel = new GameObject("SteamVR_RenderModel").AddComponent <SteamVR_RenderModel>();
            renderModel.transform.parent        = transform;
            renderModel.transform.localPosition = Vector3.zero;
            renderModel.transform.localRotation = Quaternion.identity;
            renderModel.transform.localScale    = Vector3.one;

            renderModel.SetInputSource(inputSource);
            renderModel.SetDeviceIndex(deviceIndex);

            if (!initialized)
            {
                //The controller hint render model needs to be active to get accurate transforms for all the individual components
                renderModel.gameObject.SetActive(true);
            }
        }