diff --git a/Assets/Scripts/Core/Stage.cs b/Assets/Scripts/Core/Stage.cs index 006fd481..c241887e 100644 --- a/Assets/Scripts/Core/Stage.cs +++ b/Assets/Scripts/Core/Stage.cs @@ -917,7 +917,7 @@ void GetHitTarget() #endif pos.y = Screen.height - pos.y; TouchInfo touch = _touches[0]; - if (pos.x < 0 || pos.y < 0) // outside of the window + if (float.IsNaN(pos.x) || float.IsNaN(pos.y) || float.pos.x < 0 || pos.y < 0) // outside of the window _touchTarget = this; else _touchTarget = HitTest(pos, true); @@ -1810,4 +1810,4 @@ public DisplayObject ClickTest() return obj; } } -} \ No newline at end of file +}