我正面臨着這個問題。我想創建一個hexgrid並能夠以這種方式來創建: //grid extents
int numCols,numRows;
for (int i=0; i<numCols; ++i){
for (int j=0; j<numRows; ++j){
//x and y coordinates of my hexagon's vertices
float xpos,yp
我試圖將紋理映射到六角形上,但我無法弄清紋理座標。 These are my vertices:
private float vertices[] = { 0.0f, 0.0f, 0.0f, //center
0.0f, 1.0f, 0.0f, // top
-1.0f, 0.5f, 0.0f, // left top
-