Exemplo n.º 1
0
 // pos: texture coordinate of raycast hit
 protected void SetVirtualMousePosition(Vector2 pos)
 {
     if (m_WebView != null)
     {
         m_VirtualMousePosition = new Vector2(pos.x * m_Texture.width, (float)m_WebView.GetHeight() - (pos.y * m_Texture.height));
         m_WebView.SendMouseMove((int)m_VirtualMousePosition.x, (int)m_VirtualMousePosition.y);
     }
 }
Exemplo n.º 2
0
    // pos: texture coordinate of raycast hit
    protected void SetVirtualMousePosition(Vector2 pos)
    {
        if (m_WebView != null)
        {
            m_VirtualMousePosition = new Vector2(pos.x * m_Texture.width, (float)m_WebView.GetHeight() - (pos.y * m_Texture.height));

            if (m_UseTouchEvents)
            {
                if (m_IsVirtualMouseButtonPressed)
                {
                    m_WebView.SendTouchEvent(VRWebViewTouchTypeEnum.VRWebViewTouchType_Moved, SIMULATED_TOUCH_ID, m_VirtualMousePosition.x, m_VirtualMousePosition.y);
                }
            }
            else
            {
                m_WebView.SendMouseMove((int)m_VirtualMousePosition.x, (int)m_VirtualMousePosition.y);
            }
        }
    }