void Start() { arc = gameObject.AddComponent <Valve.VR.InteractionSystem.TeleportArc>(); arc.traceLayerMask = traceLayerMask; arc.material = teleportMaterial; invalid_reticle = Instantiate <Transform>(invalidReticlePrefab); invalid_reticle.gameObject.SetActive(false); destination_reticle = Instantiate <Transform>(destinationReticlePrefab); destination_reticle.gameObject.SetActive(false); }
void Start() { arc = gameObject.AddComponent <Valve.VR.InteractionSystem.TeleportArc>(); arc.traceLayerMask = traceLayerMask; arc.material = teleportMaterial; invalid_reticle = Instantiate <Transform>(invalidReticlePrefab); invalid_reticle.gameObject.SetActive(false); destination_reticle = Instantiate <Transform>(destinationReticlePrefab); destination_reticle.gameObject.SetActive(false); var gt = Controller.GlobalTracker(this); gt.SetPriority(-10); gt.onTouchPressDown += OnTouchPressDown; gt.onTouchPressDrag += OnTouchPressDrag; gt.onTouchPressUp += OnTouchPressUp; }