Ejemplo n.º 1
0
 private void LateUpdate()
 {
     if (!VRUICheckInteractable.IsInteractable())
     {
         Player.instance.transform.position = gameObject.transform.position;
     }
 }
Ejemplo n.º 2
0
    static public bool IsInteractable()
    {
        GameObject grpCanvas = GameObject.Find("Grp_Canvas");

        if (grpCanvas)
        {
            VRUICheckInteractable check = grpCanvas.GetComponent <VRUICheckInteractable>() as VRUICheckInteractable;
            if (check)
            {
                return(check.bInteractable());
            }
        }
        return(true);
    }
Ejemplo n.º 3
0
    private void calculateMatInCam()
    {
        if (VRUICheckInteractable.IsInteractable())
        {
            cameraFollow = GameObject.Find("VRCamera").GetComponent <Camera>() as Camera;
        }
        else
        {
            cameraFollow = GameObject.Find("Camera").GetComponent <Camera>() as Camera;
        }

        Vector3    pos = new Vector3(0.0f, 0.0f, -distance);
        Quaternion rot = new Quaternion();

        rot.eulerAngles = new Vector3(0.0f, 180.0f, 0.0f);
        matInCam.SetTRS(pos, rot, gameObject.transform.localScale);
    }
Ejemplo n.º 4
0
 private void Update()
 {
     if (ingameGlobalManager.instance.currentPuzzle)
     {
         if (ingameGlobalManager.instance.GetSteamVRTeleportPlayerDown())
         {
             teleportPlayer();
         }
     }
     else
     {
         if ((bPlayerWithUI && !VRUICheckInteractable.IsInteractable()) ||
             (!bPlayerWithUI && VRUICheckInteractable.IsInteractable()))
         {
             teleportPlayer();
         }
     }
 }