opengl - Billboarding in LWJGL -


i'm making "2.5d" game 3d , 2d items. have created 3d world , working on 2d items. i've looked on billboarding tutorials, none of them seemed work (because i'm noob , messed up). need know how set gltranslate , glrotate next render sequence renders object perpendicular plane of camera, in other words, 2d in 3d world.

here i'm using:

gl11.glpushmatrix(); gl11.gltranslatef(0, 0, 0); gl11.glrotatef(360.0f - player.camera.vector.x, 0, -1.0f, 0);  gl11.glrotatef(player.camera.vector.z, -1.0f, 0, 0); renderdroppeditems(); 

thanks in advance!

you should learn opengl first, , there ii mistake in code:

gl11.glrotatef(360.0f - player.camera.vector.x, 0, -1.0f, 0);  

it should :

gl11.glrotatef(360.0f - player.camera.vector.x, -1.0f, 0, 0);  

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -