From d82e18288cce549b300b3e59cb1d2de68c18fb3b Mon Sep 17 00:00:00 2001 From: kts of kettek Date: Sat, 29 Jan 2022 23:02:52 -0800 Subject: [PATCH] Use Polygon --- Engine/src/states/Game.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/src/states/Game.ts b/Engine/src/states/Game.ts index 1a864af..de6cdb3 100644 --- a/Engine/src/states/Game.ts +++ b/Engine/src/states/Game.ts @@ -255,7 +255,7 @@ export function GameState(ctx: ContextI): StateI { // Zonage let addZone = (zone: Zone) => { if (zones.find(v=>v===zone)) return - let shape = planck.Chain(zone.points.map(v=>planck.Vec2(v[0],v[1]))) + let shape = planck.Polygon(zone.points.map(v=>planck.Vec2(v[0],v[1]))) zone.fixture = worldBody.createFixture({ shape: shape, })