fix(hitbox3D): adapt dz to oz checking collision

This commit is contained in:
Kazhnuz 2022-01-23 18:55:48 +01:00
parent 0b77dc8857
commit ffd58ea1cb

View file

@ -134,7 +134,7 @@ end
function Hitbox3D:checkCollisionAtPoint(dx, dy, dz, filter) function Hitbox3D:checkCollisionAtPoint(dx, dy, dz, filter)
self:updatePosition() self:updatePosition()
local dx, dy = self.ox + dx, self.oy + dy, self.oz + dz local dx, dy, dz = self.ox + dx, self.oy + dy, self.oz + dz
local x, y, z, cols, colNumber = self.world:checkCollisionAtPoint(self, dx, dy, dz, filter) local x, y, z, cols, colNumber = self.world:checkCollisionAtPoint(self, dx, dy, dz, filter)
local newx, newy, newz = self:getNewOwnerPosition(x, y, z) local newx, newy, newz = self:getNewOwnerPosition(x, y, z)