diff --git a/gamecore/modules/world/world3D.lua b/gamecore/modules/world/world3D.lua index 0bc7139..9d6a98a 100644 --- a/gamecore/modules/world/world3D.lua +++ b/gamecore/modules/world/world3D.lua @@ -131,7 +131,16 @@ end function World3D:newCollisionFromMap(objectlayer, object) local z = object.properties.z or 0 local d = object.properties.d or 16 - self:newCollision(objectlayer.name, object.x, object.y, z, object.width, object.height, d) + local fromTop = object.properties.fromTop or false + + local y = object.y + if (fromTop) then + print("create from top, set z and y:", z, y, "=>", z-d, y+z) + y = y + z + z = z - d + end + + self:newCollision(objectlayer.name, object.x, y, z, object.width, object.height, d) end function World3D:addPlayerFromMap(object, i)