java - 3d triangle in libgdx -


my problem in libgdx, created triangle in 3d mesh class in simple piece of code :

mesh = new mesh(true, 3, 3,                  new vertexattribute(vertexattributes.usage.position, 3, "vposition"));  mesh.setvertices(new float[] { vert1.x, vert1.y, vert1.z, vert2.x, vert2.y, vert2.z, vert3.x, vert3.y, vert3.z }); mesh.setindices(new short[] { 0, 1, 2 }); 

what important me able change vert1, vert2, vert3, store triangle vertices coordinates, want create triangle during game.

when triangle displayed, seems appear @ desired place, according give him in verts vector3.

now, here's thing : used camera.rotatearound() create way around scene , created small box see if script camera merely working. ! can see box rotating if move camera. when rotate around scene, triangle created doesn't rotate , stays motionless @ screen, 2d mesh !

so here question : how make 3d triangle in libgdx , how make triangle render according camera movement ?

found solution here : http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=10583&p=47800#p47800

that immediatemoderenderer20 gives temporary way create 3d meshes, including triangles.

it seems libgdx mesh class 2d...


Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

java - What is the difference between String. and String.this. ? -