Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int currentIndex = column + Nx * row;
- Vector3 centerCoord = tgs.CellGetPosition(myCells[currentIndex]);
- int texture_height = my_texture.height;
- int texture_width = my_texture.width;
- int dx_texture_size = texture_height / Nx;
- int dz_texture_size = texture_width / Nz;
- int pixel_coord_x = dx_texture_size / 2 + column * dx_texture_size;
- int pixel_coord_z = dz_texture_size / 2 + row * dz_texture_size;
- Color cell_color = my_texture.GetPixel(pixel_coord_x, pixel_coord_z);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement