fix position of dettach

This commit is contained in:
Alexsandro Percy 2024-02-15 21:36:36 -03:00
parent 9b69744e2b
commit b51d1bdcae
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ function airutils.dettach_entity(self)
local move = -1*relative_pos.z/10
pos.x = pos.x + move * math.sin(direction)
pos.z = pos.z + move * math.cos(direction)
pos.z = pos.z - move * math.cos(direction)
pos.y = pos.y + self.initial_properties.collisionbox[2] - ent.initial_properties.collisionbox[2]
obj:set_detach()
obj:set_pos(pos)