From 2116b83274b6ebd80fbeb01a33785dd948ff6b51 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Wed, 30 Oct 2024 19:46:42 +0100 Subject: [PATCH] fix(actors/physics): only update the shape if there is one --- framework/scenes/world/actors/physics/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/scenes/world/actors/physics/init.lua b/framework/scenes/world/actors/physics/init.lua index 1a48860..d53afe1 100644 --- a/framework/scenes/world/actors/physics/init.lua +++ b/framework/scenes/world/actors/physics/init.lua @@ -145,7 +145,9 @@ function Physics:move(position) if (self.isDestroyed == false) then self.position, cols, colNumber = self.mainHitbox:checkCollisionAtPoint(position, self.filter) self.mainHitbox:updatePosition() - self.world:updateShape(self) + if (self.visual ~= nil) then + self.world:updateShape(self) + end end return self.position, cols, colNumber