Advertisement
Guest User

Untitled

a guest
May 19th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. int currentIndex = column + Nx * row;
  2. Vector3 centerCoord = tgs.CellGetPosition(myCells[currentIndex]);
  3.  
  4. int texture_height = my_texture.height;
  5. int texture_width = my_texture.width;
  6.  
  7. int dx_texture_size = texture_height / Nx;
  8. int dz_texture_size = texture_width / Nz;
  9.  
  10. int pixel_coord_x = dx_texture_size / 2 + column * dx_texture_size;
  11. int pixel_coord_z = dz_texture_size / 2 + row * dz_texture_size;
  12.  
  13. Color cell_color = my_texture.GetPixel(pixel_coord_x, pixel_coord_z);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement