I am using 2D tilemap and tiles that instantiate game object prefabs. like the one in the picture:
What I am trying to do is to check if the tile of the tree is occupied by using tilemap.HasTile. The problem that I get the center tile (the one marked in red) instead the one I want (the one marked in blue).
Is there a way to create some kind of offset to the tile, or choose from where the instantiated game object will be created (I basically want the game object instantiated from the blue, instead of the red).
The easiest way is to set the pivot point in the tree’s sprite to somewhere near where the bottom mass of the trunk is. This is done in the Sprite Editor, which is now an installable package rather than built in.
1 Like
Thank you
It worked perferctly.
1 Like