Hi, I want to move some part of my tilemap tiles smoothly, in all 4 directions.
It's not something like moving platform - Players decide which tiles to move, and also direction. So please don't tell me something like 'Just create a gameobject that moves!'.
For the smooth moving, I don't want to use getTile() and setTile() method only because in that way tiles just disappears and appears suddenly.
So My solution is little bit tricky :
1)Create a Sprite from part of the tilemap.
2)Overlap the sprite over the tiles which I originally wanted to move.
3)Make original tiles disappear, using setTile(originalX,originalY,-1).
4)Sprite starts to move.(Smoothly!)
5)If sprite reaches its destination, destroy the sprite and reappear tiles using setTile(destX,destY,originalTileType)
Then player can never notice how things work, but they'll only see tiles moving smoothly.
But the problem is I don't know how to create sprite from tilemap... I can get integer tileType data, but I don't know how to create sprite from it.
Can anyone help me please?
*oh and sry if my english is poor, it's not my native language:(