ソースを参照

fixed localscale hit test

dm 7 年 前
コミット
74b7d73201
1 ファイル変更1 行追加0 行削除
  1. 1 0
      oxygine/src/oxygine/actor/Sprite.cpp

+ 1 - 0
oxygine/src/oxygine/actor/Sprite.cpp

@@ -96,6 +96,7 @@ namespace oxygine
 
         const unsigned char* buff = ad.data;
         Vector2 pos = localPosition * _frame.getResAnim()->getAppliedScale();
+        pos = pos.div(_localScale);
         Point lp = pos.cast<Point>() / HIT_TEST_DOWNSCALE;
         Rect r(0, 0, ad.w, ad.h);
         if (r.pointIn(lp))