public override void ShowTracker(bool shown) { if (!enabled) { return; } #if hVIVETRACKER if (humanoid == null) { return; } ViveTracker.ShowTracker(humanoid, shown); #endif }
protected virtual void OnNewSensor(uint sensorId) { Passer.ETrackedDeviceClass deviceClass = Passer.OpenVR.System.GetTrackedDeviceClass(sensorId); switch (deviceClass) { case Passer.ETrackedDeviceClass.HMD: hmd = FindHmd(sensorId); if (hmd == null) { hmd = OpenVRHmd.NewHmd(humanoid, (int)sensorId); } break; case Passer.ETrackedDeviceClass.TrackingReference: SubTracker subTracker = FindLighthouse(sensorId); if (subTracker == null) { subTrackers.Add(NewLighthouse(humanoid, sensorId)); } break; case Passer.ETrackedDeviceClass.Controller: OpenVRController controller = FindController(sensorId); if (controller == null) { controllers.Add(OpenVRController.NewController(humanoid, (int)sensorId)); } break; #if hVIVETRACKER case Passer.ETrackedDeviceClass.GenericTracker: ViveTrackerComponent viveTracker = FindViveTracker(sensorId); if (viveTracker == null) { viveTrackers.Add(ViveTracker.NewViveTracker(humanoid, sensorId)); } break; #endif default: break; } }