Created
July 2, 2016 21:22
-
-
Save OutlawGameTools/0e4852cd99605b0eb30c66f8f1d9c3d2 to your computer and use it in GitHub Desktop.
GetWorldPosition -- pass in col # and row # and get back a position for that cell.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vector2 GetWorldPosition(int col, int row) | |
{ | |
return new Vector2 (transform.position.x - numCols/2.0f + col, transform.position.y + numRows/2.0f - row); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment