浏览代码

Merge pull request #216 from Unity-Technologies/fix_raycastable_issue

raycastable panel pointer position bug fix
/main
GitHub 3 年前
当前提交
900511e3
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      com.unity.uiwidgets/Runtime/engine/raycastable/UIWidgetsRaycastablePanel.cs

4
com.unity.uiwidgets/Runtime/engine/raycastable/UIWidgetsRaycastablePanel.cs


// Convert top left corner as reference origin point.
local.x += rectTransform.pivot.x * rect.width;
local.y -= rectTransform.pivot.y * rect.height;
local.x = local.x / _currentDevicePixelRatio;
local.y = -local.y / _currentDevicePixelRatio;
local.x = local.x / (_currentDevicePixelRatio / canvas.scaleFactor);
local.y = -local.y / (_currentDevicePixelRatio / canvas.scaleFactor);
return !RaycastManager.CheckCastThrough(windowHashCode, local);
}
正在加载...
取消
保存