We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6b17fba + 25b7bcc commit e6bb06dCopy full SHA for e6bb06d
Assets/Scripts/Core/Stage.cs
@@ -917,7 +917,9 @@ void GetHitTarget()
917
#endif
918
pos.y = Screen.height - pos.y;
919
TouchInfo touch = _touches[0];
920
- if (float.IsNaN(pos.x) || float.IsNaN(pos.y) || float.pos.x < 0 || pos.y < 0) // outside of the window
+ if (float.IsNaN(pos.x) || float.IsNaN(pos.y) || float.IsInfinity(pos.x) || float.IsInfinity(pos.y)) //not a valid position
921
+ _touchTarget = this;
922
+ else if (pos.x < 0 || pos.y < 0) // outside of the window
923
_touchTarget = this;
924
else
925
_touchTarget = HitTest(pos, true);
0 commit comments