fix scaled dragToSelect

This commit is contained in:
2023-12-06 15:52:22 -07:00
parent 245b7b0c9b
commit a3b7ef74ce

View File

@@ -124,8 +124,8 @@ class DragToSelectPlugin extends FlxBasic {
dragState.firstCorner = null;
for (s in dragState.enabledSprites) {
var scaledWorldRect = s.getScreenBounds(camera);
scaledWorldRect.x += camera.viewLeft;
scaledWorldRect.y += camera.viewTop;
scaledWorldRect.x += camera.scroll.x;
scaledWorldRect.y += camera.scroll.y;
var intersection = scaledWorldRect.intersection(rect);
if (!intersection.isEmpty) {
// if pixel perfect is true, get the pixels in the intersection and hit test them for transparency