modules/world: displace the map according to the view relative position
This commit is contained in:
parent
065a67a915
commit
aaf0b1882b
1 changed files with 4 additions and 3 deletions
|
@ -310,9 +310,10 @@ function BaseWorld:drawMap(id)
|
|||
-- de position de camera pour afficher la carte par rapport à ces infos
|
||||
tx, ty = self.cameras:getViewCoordinate(id)
|
||||
scale = self.cameras:getViewScale(id) or 1
|
||||
|
||||
tx = math.floor(tx)
|
||||
ty = math.floor(ty)
|
||||
vx, vy = self.cameras:getOnScreenViewRelativePosition(id)
|
||||
print(tx + vx, ty + vy)
|
||||
tx = math.floor(tx - math.abs(vx))
|
||||
ty = math.floor(ty - math.abs(vy))
|
||||
end
|
||||
|
||||
if self.haveMap then
|
||||
|
|
Loading…
Reference in a new issue