{"action":"created","issue":{"url":"https://api.github.com/repos/mizipzor/UnityTileMap/issues/11","labels_url":"https://api.github.com/repos/mizipzor/UnityTileMap/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/mizipzor/UnityTileMap/issues/11/comments","events_url":"https://api.github.com/repos/mizipzor/UnityTileMap/issues/11/events","html_url":"https://github.com/mizipzor/UnityTileMap/issues/11","id":57507496,"number":11,"title":"flip & rotate","user":{"login":"rakkarage","id":962340,"avatar_url":"https://avatars.githubusercontent.com/u/962340?v=3","gravatar_id":"","url":"https://api.github.com/users/rakkarage","html_url":"https://github.com/rakkarage","followers_url":"https://api.github.com/users/rakkarage/followers","following_url":"https://api.github.com/users/rakkarage/following{/other_user}","gists_url":"https://api.github.com/users/rakkarage/gists{/gist_id}","starred_url":"https://api.github.com/users/rakkarage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rakkarage/subscriptions","organizations_url":"https://api.github.com/users/rakkarage/orgs","repos_url":"https://api.github.com/users/rakkarage/repos","events_url":"https://api.github.com/users/rakkarage/events{/privacy}","received_events_url":"https://api.github.com/users/rakkarage/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-12T19:29:57Z","updated_at":"2015-03-12T13:45:45Z","closed_at":null,"body":"got it kinda working like this but of course there is a better way\r\n\r\n\t\t\tif (rotate == TileRotate.Rotate0)\r\n\t\t\t{\r\n\t\t\t\tif (flip == TileFlip.FlipNone)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 0-1\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 2-3\r\n\t\t\t\t\t// rotate 0\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t\telse if (flip == TileFlip.FlipX)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 1-0\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 3-2\r\n\t\t\t\t\t// rotate 0 flip x\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t\telse if (flip == TileFlip.FlipY)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 2-3\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 0-1\r\n\t\t\t\t\t// rotate 0 flip y\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (rotate == TileRotate.Rotate90)\r\n\t\t\t{\r\n\t\t\t\tif (flip == TileFlip.FlipNone)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 2-0\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 3-1\r\n\t\t\t\t\t// rotate 90\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t\telse if (flip == TileFlip.FlipX)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 3-1\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 2-0\r\n\t\t\t\t\t// rotate 90 flip x\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t\telse if (flip == TileFlip.FlipY)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 0-2\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 1-3\r\n\t\t\t\t\t// rotate 90 flip y\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (rotate == TileRotate.Rotate180)\r\n\t\t\t{\r\n\t\t\t\tif (flip == TileFlip.FlipNone)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 3-2\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 1-0\r\n\t\t\t\t\t// rotate 180\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t\telse if (flip == TileFlip.FlipX)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 2-3\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 0-1\r\n\t\t\t\t\t// rotate 180 flip x\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t\telse if (flip == TileFlip.FlipY)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 1-0\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 3-2\r\n\t\t\t\t\t// rotate 180 flip y\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (rotate == TileRotate.Rotate270)\r\n\t\t\t{\r\n\t\t\t\tif (flip == TileFlip.FlipNone)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 1-3\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 0-2\r\n\t\t\t\t\t// rotate 270\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t\telse if (flip == TileFlip.FlipX)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 0-2\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 1-3\r\n\t\t\t\t\t// rotate 270 flip x\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t\telse if (flip == TileFlip.FlipY)\r\n\t\t\t\t{\r\n\t\t\t\t\t// 3-1\r\n\t\t\t\t\t//  /\r\n\t\t\t\t\t// 2-0\r\n\t\t\t\t\t// rotate 270 flip y\r\n\t\t\t\t\tuv[index + 3] = ToUv(new Vector2(tr.xMin, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 1] = ToUv(new Vector2(tr.xMax, tr.yMin), Texture);\r\n\t\t\t\t\tuv[index + 2] = ToUv(new Vector2(tr.xMin, tr.yMax), Texture);\r\n\t\t\t\t\tuv[index + 0] = ToUv(new Vector2(tr.xMax, tr.yMax), Texture);\r\n\t\t\t\t}\r\n\t\t\t}"},"comment":{"url":"https://api.github.com/repos/mizipzor/UnityTileMap/issues/comments/78481709","html_url":"https://github.com/mizipzor/UnityTileMap/issues/11#issuecomment-78481709","issue_url":"https://api.github.com/repos/mizipzor/UnityTileMap/issues/11","id":78481709,"user":{"login":"mizipzor","id":139879,"avatar_url":"https://avatars.githubusercontent.com/u/139879?v=3","gravatar_id":"","url":"https://api.github.com/users/mizipzor","html_url":"https://github.com/mizipzor","followers_url":"https://api.github.com/users/mizipzor/followers","following_url":"https://api.github.com/users/mizipzor/following{/other_user}","gists_url":"https://api.github.com/users/mizipzor/gists{/gist_id}","starred_url":"https://api.github.com/users/mizipzor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mizipzor/subscriptions","organizations_url":"https://api.github.com/users/mizipzor/orgs","repos_url":"https://api.github.com/users/mizipzor/repos","events_url":"https://api.github.com/users/mizipzor/events{/privacy}","received_events_url":"https://api.github.com/users/mizipzor/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T13:45:45Z","updated_at":"2015-03-12T13:45:45Z","body":"Sorry I missed this. Seems like I'm not getting notification emails.\r\n\r\nIs this something you wont to add to ```TileMeshQuadGridBehaviour.cs```? If so, could you create a pull request for it?"}}