Example #1
0
    //-------------------------------------------------
    void Awake()
    {
        _instance = this;

        chaperoneInfoInitializedAction = ChaperoneInfo.InitializedAction(OnChaperoneInfoInitialized);

        pointerLineRenderer   = GetComponentInChildren <LineRenderer>();
        teleportPointerObject = pointerLineRenderer.gameObject;

        int tintColorID = Shader.PropertyToID("_TintColor");

        fullTintAlpha = pointVisibleMaterial.GetColor(tintColorID).a;

        teleportArc = GetComponent <TeleportArc>();
        teleportArc.traceLayerMask = traceLayerMask;

        loopingAudioMaxVolume = loopingAudioSource.volume;

        playAreaPreviewCorner.SetActive(false);
        playAreaPreviewSide.SetActive(false);

        float invalidReticleStartingScale = invalidReticleTransform.localScale.x;

        invalidReticleMinScale *= invalidReticleStartingScale;
        invalidReticleMaxScale *= invalidReticleStartingScale;

        visible = true;
    }
 private void Start()
 {
     handType = GetComponent <VRHandControls>().handType;
     line     = GetComponent <LineRenderer>();
     arc      = new TeleportArc();
     Assert.IsNotNull(player, "Player transform has not been set in Editor");
     pHead = player.GetChild(2);
 }
Example #3
0
 void Awake()
 {
     pose                       = GetComponent <SteamVR_Behaviour_Pose>();
     inputSource                = pose.inputSource;
     controllerPointer          = gameObject.AddComponent <ControllerPointer>();
     teleportArc                = GetComponent <TeleportArc>();
     teleportArc.traceLayerMask = layerMask;
 }
    void Awake()
    {
        // pointerLineRenderer = GetComponentInChildren<LineRenderer>();
        trackedObj = GetComponent <SteamVR_TrackedObject>();

        teleportArc = GetComponent <TeleportArc>();
        teleportArc.traceLayerMask = traceLayerMask;
        invalidReticleTransform.gameObject.SetActive(false);
    }
 private void Awake()
 {
     _teleporter         = FindObjectOfType <Teleporter>();
     _arc                = GetComponentInChildren <TeleportArc>();
     _teleportMarker     = FindObjectOfType <TeleportPoint>();
     _markerCollider     = _teleportMarker.GetComponentInChildren <TeleportMarkerCollider>();
     _arc.traceLayerMask = ~((1 << 13) | (1 << 9)); // ignore teleport marker and mag. rect
     _aimAnchor          = _arc.transform;
 }
Example #6
0
 void Awake()
 {
     teleportArc = GetComponent <TeleportArc>();
     teleportArc.traceLayerMask = layerMask;
 }