title: Getting the center of a grid's cell - unity
body: <p>I'm working on an isometric game with Unity and I need to know the centre of the cell in the world coordinates. I'm using the tilemap's <code>GetCellCenterWorld()</code> method, but it gives me back bad results.
  <a href="https://i.stack.imgur.com/anAOZ.png" rel="nofollow noreferrer">Here</a> is what I expect to be the centre of the cell (basically the logical centre), but <a href="https://i.stack.imgur.com/ajP0P.png" rel="nofollow noreferrer">here</a> is what Unity gives back (the top vertex of the cell?). I believe it has something to do with the sprite's pivot point (now set to its top centre) or the cell anchor in the tilemap's properties (I set it to <strong>(1,1)</strong>).</p>
  <p>Here's the code I use to &quot;select&quot; the tiles:</p>
  <pre class="lang-cs prettyprint-override"><code>public class GridSelection : MonoBehaviour
  {
      public Tilemap tilemap;
      public Transform selector;
  
      void Update()
      {
          Vector3 worldPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
          worldPos.z = 0;
  
          Vector3Int tilemapPos = tilemap.WorldToCell(worldPos);
          selector.position = tilemap.GetCellCenterWorld(tilemapPos);
      }
  }
  </code></pre>
  <p>How do I get the actual middle point of the cell?</p>