Пример #1
0
 public VrTrackedDevice(VrTrackedDevices trackedDevices, int iindex)
 {
     this.vr             = trackedDevices.vr;
     this.TrackedDevices = trackedDevices;
     this.index          = Convert.ToUInt32(iindex);
     this.device_class   = GetClass();
     this.TriggerPressed = false;
 }
Пример #2
0
        public void Update()
        {
            if (!Success)
            {
                return;
            }
            TrackedDevices = new VrTrackedDevices(this.vr);
            //Initializing object to hold indexes for various tracked objects
            vr.GetDeviceToAbsoluteTrackingPose(ETrackingUniverseOrigin.TrackingUniverseStanding, 0, Poses);

            //# Iterate through the pose list to find the active Devices and determine their type
            for (int i = 0; i < OpenVR.k_unMaxTrackedDeviceCount; i++)
            {
                if (Poses[i].bPoseIsValid)
                {
                    TrackedDevices.AddTrackedDevice(i);
                }
            }
        }