I’m currently experiencing an weird issue with map:scale()
Basically what I’m doing:
function onLoop(event)
local xScale, yScale = map:getScale()
map:setPosition(player.x * xScale, player.y * yScale)
end
to set the map on the player at every Loop of the engine.
This working fine when the map boot with the scale at 1.
Then I have 2 button: 1 that remove 0.2 to the scale
and one that set the scale add 0.2 to the scale.
for some reason when I set the scale back to 1 more often that not the map:setPosition(player.x * xScale, player.y * yScale) get wrong data and the map is displayed offset that the player.
I’ve tried fixing this issue but I don’t seems to get an hand on how to fix this …
Anyone can help ? [import]uid: 64835 topic_id: 17558 reply_id: 317558[/import]