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,8 +145,10 @@ function Physics:move(position)
|
|||
if (self.isDestroyed == false) then
|
||||
self.position, cols, colNumber = self.mainHitbox:checkCollisionAtPoint(position, self.filter)
|
||||
self.mainHitbox:updatePosition()
|
||||
if (self.visual ~= nil) then
|
||||
self.world:updateShape(self)
|
||||
end
|
||||
end
|
||||
|
||||
return self.position, cols, colNumber
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue