Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Setting up HTC Vive HMD and controllers

$
0
0
I am trying to access the HTC Vive controllers and HMD so that I can control my scene based on the tracking information. This was working until I updated Unity. In Start I have the following code: GameObject rightController = GameObject.Find ("Main Camera (origin)").transform.GetChild(0).gameObject; myRightController = rightController.GetComponent (); GameObject leftController = GameObject.Find ("Main Camera (origin)").transform.GetChild(1).gameObject; myLeftController = leftController.GetComponent (); GameObject head = GameObject.Find ("Main Camera (origin)").transform.GetChild(2).gameObject; myHMD = head.GetComponent (); Both the left and right hands work fine. The problem is with the HMD. The head object is not null and has the Main Camera (eye). But, myHMD is null. The Main Camera (eye) has a Steam VR_Tracked Object script attached. I have tried setting the index to Hmd and a device number. Nothing has worked. Any advice would be greatly appreciated.

Viewing all articles
Browse latest Browse all 7934


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>