Skip to content

Commit

Permalink
FlxMouseEventManager: fix pixel-perfect overlaps with offset (#1999)
Browse files Browse the repository at this point in the history
Updated logic in checkPixelPerfectOverlap to account for a non-zero offset affecting the pivot point.
  • Loading branch information
seraku24 authored and Gama11 committed Jan 11, 2017
1 parent 5548e6c commit 53e5593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flixel/input/mouse/FlxMouseEventManager.hx
Expand Up @@ -491,7 +491,7 @@ class FlxMouseEventManager extends FlxBasic
{
if (Sprite.angle != 0)
{
var pivot = FlxPoint.weak(Sprite.x + Sprite.origin.x, Sprite.y + Sprite.origin.y);
var pivot = FlxPoint.weak(Sprite.x + Sprite.origin.x - Sprite.offset.x, Sprite.y + Sprite.origin.y - Sprite.offset.y);
Point.rotate(pivot, -Sprite.angle);
}
return Sprite.pixelsOverlapPoint(Point, 0x01, Camera);
Expand Down

0 comments on commit 53e5593

Please sign in to comment.