Ejemplo n.º 1
0
        // Get required references, sanity check references, instansiate required visuals
        void Awake()
        {
            trackedObject = GetComponent <Varjo_SteamVR_TrackedObject>();

            if (varjoUser == null || varjoCamera == null || teleportTargetPrefab == null)
            {
                Debug.LogError("Varjo teleport disabled from " + gameObject + ": Missing references.", gameObject);
                enabled = false;
            }

            teleportArcRenderer    = teleportPointer.GetComponent <LineRenderer>();
            teleportTarget         = Instantiate(teleportTargetPrefab).transform;
            teleportTargetRenderer = teleportTarget.GetComponentInChildren <Renderer>();
        }
Ejemplo n.º 2
0
 // Get components required for by this script
 void Awake()
 {
     trackedObject = GetComponent <Varjo_SteamVR_TrackedObject>();
     fixedJoint    = GetComponent <FixedJoint>();
 }