From 2817b836ec090200bb67887f73a4353084621b37 Mon Sep 17 00:00:00 2001 From: Jacek Pietal Date: Fri, 1 Mar 2024 15:53:29 +0100 Subject: [PATCH] feat: approx get scale improve, Update polygon.ts --- src/bodies/polygon.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bodies/polygon.ts b/src/bodies/polygon.ts index 550fba8a..6a39d381 100644 --- a/src/bodies/polygon.ts +++ b/src/bodies/polygon.ts @@ -197,7 +197,7 @@ export class Polygon extends SATPolygon implements BBox, BodyProps { * allow approx getting of scale */ get scale(): number { - return this.scaleVector.x; + return (this.scaleVector.x + this.scaleVector.y) / 2; } /**