For some reason the grid in chat is not the same as on the map. Any ideas?


For some reason the grid in chat is not the same as on the map. Any ideas?


public static string PositionToGrid(Vector3 position) // Rewrite from yetzt implementation
{
var r = new Vector2(World.Size / 2 + position.x, World.Size / 2 + position.z);
var x = Mathf.Floor(r.x / 146.3f) % 26;
var z = Mathf.Floor(World.Size / 146.3f) - Mathf.Floor(r.y / 146.3f);
return $"{(char)('A' + x)}{z - 1}";
} please post the map seed and size if having this issue. this should never fail, nor require any such modification to compensate for certain map sizes like other similar methods do
i don't remember the seed as this was ages ago, but the modification did fix the issue.