GazeInputModule.CastRayFromGaze C# (CSharp) Method

CastRayFromGaze() private method

private CastRayFromGaze ( ) : void
return void
    private void CastRayFromGaze()
    {
        Vector2 headPose = NormalizedCartesianToSpherical(GvrViewer.Instance.HeadPose.Orientation * Vector3.forward);

        if (pointerData == null) {
          pointerData = new PointerEventData(eventSystem);
          lastHeadPose = headPose;
        }

        // Cast a ray into the scene
        pointerData.Reset();
        pointerData.position = new Vector2(hotspot.x * Screen.width, hotspot.y * Screen.height);
        eventSystem.RaycastAll(pointerData, m_RaycastResultCache);
        pointerData.pointerCurrentRaycast = FindFirstRaycast(m_RaycastResultCache);
        m_RaycastResultCache.Clear();
        pointerData.delta = headPose - lastHeadPose;
        lastHeadPose = headPose;
    }