2d-extras
2d-extras copied to clipboard
Locked Transform on Hexagonal Rule Tiles
Hello, I do not know if it is supposed to be like this but the tile transform flag is locked on rule tiles.
I am trying to do a small animation where the tile slightly changes its offset with the Tilemap.SetTransformMatrix when clicked. Normal tiles work fine but the hexagonal rule tile I am using to create the rocky edges can't be moved since the transform flag is locked and I can't seem to find any way to unlock it.
Do you know if I'm doing something wrong or is there a way to unlock the transform?
Hi, for this, you may want to use Tilemap.Add/RemoveTileFlags API with the TileFlag.LockTransform. This will allow you to adjust the transform matrix for the Tile at a position.
Hope this helps!
On Fri, 27 Nov 2020, 04:50 Eyonex, [email protected] wrote:
Hello, I do not know if it is supposed to be like this but the tile transform flag is locked on rule tiles. [image: 1] https://user-images.githubusercontent.com/14252343/100390390-7be37600-3030-11eb-9efe-648aa643dd44.PNG
I am trying to do a small animation where the tile slightly changes its offset with the Tilemap.SetTransformMatrix when clicked. Normal tiles work fine but the hexagonal rule tile I am using to create the rocky edges can't be moved since the transform flag is locked and I can't seem to find any way to unlock it. [image: 2] https://user-images.githubusercontent.com/14252343/100390565-28255c80-3031-11eb-92b5-f6bdce8f16af.PNG
Do you know if I'm doing something wrong or is there a way to unlock the transform?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Unity-Technologies/2d-extras/issues/250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHA3TETPCZYLRRMOL6PTJTDSR25Q3ANCNFSM4UEEW3GQ .
Hi, for this, you may want to use Tilemap.Add/RemoveTileFlags API with the TileFlag.LockTransform. This will allow you to adjust the transform matrix for the Tile at a position. Hope this helps!
Yes, thank you so much!!!