Transforms input from screen point to world point.
This commit is contained in:
@@ -214,7 +214,7 @@ namespace Cryville.Common.Unity.Input {
|
||||
|
||||
NativeMethods.POINT p = rawpinfo.ptPixelLocation;
|
||||
NativeMethods.ScreenToClient(hMainWindow, ref p);
|
||||
Vector2 _p = new Vector2(p.X, p.Y);
|
||||
Vector2 _p = UnityCameraUtils.ScreenToWorldPoint(new Vector2(p.X, Screen.height - p.Y));
|
||||
|
||||
double time = (double)rawpinfo.PerformanceCount / freq;
|
||||
|
||||
@@ -300,7 +300,7 @@ namespace Cryville.Common.Unity.Input {
|
||||
Y = touch.y / 100
|
||||
};
|
||||
NativeMethods.ScreenToClient(hMainWindow, ref p);
|
||||
Vector2 _p = new Vector2(p.X, p.Y);
|
||||
Vector2 _p = UnityCameraUtils.ScreenToWorldPoint(new Vector2(p.X, Screen.height - p.Y));
|
||||
|
||||
/*Vector2? _cs = null;
|
||||
if (touch.dwMask.HasFlag(NativeMethods.TOUCHINPUT_Mask.TOUCHINPUTMASKF_CONTACTAREA)) {
|
||||
|
Reference in New Issue
Block a user