Exemple #1
0
        protected SubTracker NewLighthouse(HumanoidControl humanoid, uint sensorId)
        {
            SubTracker subTracker = SteamVRSubTracker.Create(this);

            subTracker.subTrackerId = (int)sensorId;
            return(subTracker);
        }
Exemple #2
0
        public static SteamVRSubTracker Create(Tracker tracker)
        {
            Object     lighthousePrefab = Resources.Load(resourceName);
            GameObject lighthouseObject = (lighthousePrefab == null) ? new GameObject(resourceName) : (GameObject)Instantiate(lighthousePrefab);

            lighthouseObject.name             = "Lighthouse";
            lighthouseObject.transform.parent = tracker.trackerTransform;

            lighthouseObject.SetActive(false);

            SteamVRSubTracker subTracker = lighthouseObject.AddComponent <SteamVRSubTracker>();

            subTracker.tracker = tracker;

            return(subTracker);
        }