|
@@ -1,6 +1,7 @@
|
|
|
using System;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
+using Newtonsoft.Json;
|
|
|
using UnityEngine;
|
|
|
using Valve.VR;
|
|
|
|
|
@@ -8,13 +9,16 @@ public class SteamVRTrack : TrackpointMesh
|
|
|
{
|
|
|
public string filePath;
|
|
|
|
|
|
+ private GameObject meshObject;
|
|
|
private TrackpointMesh trackpointMesh;
|
|
|
private SteamVR_TrackedObject tracking;
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
{
|
|
|
- trackpointMesh = gameObject.AddComponent<TrackpointMesh>();
|
|
|
+ meshObject = new GameObject();
|
|
|
+ trackpointMesh = meshObject.AddComponent<TrackpointMesh>();
|
|
|
+ trackpointMesh.transform.parent = this.transform;
|
|
|
trackpointMesh.setup(filePath, TrackingSystem.SteamVRTrack);
|
|
|
setupTrackpointTranslationAndRotation();
|
|
|
tracking = gameObject.AddComponent<SteamVR_TrackedObject>();
|