Tiles are generally meant to be static objects that remain fixed at their map location. What you can do is spawn a sprite from the tile, remove the tile, and move the resulting sprite to your new position. For example:
local tile = mte.getTileObj(startLocX, startLocY, tileLayer) local tileSprite = tile:makeSprite() mte.changeSpriteLayer(tileSprite, tileLayer + 1) mte.updateTile({locX = startLocX, locY = startLocY, layer = tileLayer, tile = 0}) mte.moveSpriteTo({sprite = tileSprite, locX = endLocX, locY = endLocY, time = 1000})
It is also technically possible to move a tile object by directly manipulating it’s x any y properties as you would any other displayObject, if you really have to do so. This example assumes you’re still using an isometric map:
local tile = mte.getTileObj(startLocX, startLocY, tileLayer) --Insert into a higher layer so it doesn't move beneath the other tiles local layerObj = mte.getLayerObj({layer = tileLayer + 1}) layerObj:insert(tile) --Calculate the true destination coordinates local endPosX, endPosY = mte.locToLevelPos(endLocX, endLocY) local endPos = mte.isoTransform2(endPosX, endPosY) --Move the tile, then update the new tile location with the index of the old tile --and remove the old tile. local destroy = function(event) mte.updateTile({locX = endLocX, locY = endLocY, layer = tileLayer, tile = tile.index}) mte.updateTile({locX = startLocX, locY = startLocY, layer = tileLayer, tile = 0}) end transition.to(tile, {time = 1000, x = endPos[1], y = endPos[2], onComplete = destroy})