fix(actors/physics): only update the shape if there is one
This commit is contained in:
parent
52dde667bb
commit
2116b83274
1 changed files with 3 additions and 1 deletions
|
@ -145,7 +145,9 @@ function Physics:move(position)
|
||||||
if (self.isDestroyed == false) then
|
if (self.isDestroyed == false) then
|
||||||
self.position, cols, colNumber = self.mainHitbox:checkCollisionAtPoint(position, self.filter)
|
self.position, cols, colNumber = self.mainHitbox:checkCollisionAtPoint(position, self.filter)
|
||||||
self.mainHitbox:updatePosition()
|
self.mainHitbox:updatePosition()
|
||||||
self.world:updateShape(self)
|
if (self.visual ~= nil) then
|
||||||
|
self.world:updateShape(self)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return self.position, cols, colNumber
|
return self.position, cols, colNumber
|
||||||
|
|
Loading…
Add table
Reference in a new issue