fix(actors/physics): only update the shape if there is one

This commit is contained in:
Kazhnuz 2024-10-30 19:46:42 +01:00
parent 52dde667bb
commit 2116b83274

View file

@ -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