fix scaled dragToSelect
This commit is contained in:
@@ -124,8 +124,8 @@ class DragToSelectPlugin extends FlxBasic {
|
|||||||
dragState.firstCorner = null;
|
dragState.firstCorner = null;
|
||||||
for (s in dragState.enabledSprites) {
|
for (s in dragState.enabledSprites) {
|
||||||
var scaledWorldRect = s.getScreenBounds(camera);
|
var scaledWorldRect = s.getScreenBounds(camera);
|
||||||
scaledWorldRect.x += camera.viewLeft;
|
scaledWorldRect.x += camera.scroll.x;
|
||||||
scaledWorldRect.y += camera.viewTop;
|
scaledWorldRect.y += camera.scroll.y;
|
||||||
var intersection = scaledWorldRect.intersection(rect);
|
var intersection = scaledWorldRect.intersection(rect);
|
||||||
if (!intersection.isEmpty) {
|
if (!intersection.isEmpty) {
|
||||||
// if pixel perfect is true, get the pixels in the intersection and hit test them for transparency
|
// if pixel perfect is true, get the pixels in the intersection and hit test them for transparency
|
||||||
|
Reference in New Issue
Block a user