Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Misalignment of the hittest area of PolygonHitbox (#2930)
When performing a pointer hit test using PolygonHitbox, there may be a discrepancy between the expected range and the range in which the hit test succeeds. If the polygon shape has an offset at the top left, the hit test will behave as if there is no offset. Investigation revealed that the cause was in the calculation of containsLocalPoint() in the PolygonComponent. The unnecessary offset calculation was removed, and the hit test is now performed in the expected range. Closes #2758 --------- Co-authored-by: Lukas Klingsbo <me@lukas.fyi>
- Loading branch information