I am wondering how exactly I can convert a location (X Y Z) to a point on screen (X Y).
I have a player (the player you control) who is in (X Y Z) co-ordinates and another player who is also in (X Y Z) co-ordinates.
How exactly can I convert the other player's X Y Z to X Y on screen so that I can draw a name above him/it using the X Y.
Hope that makes sense...
Edit:
Here is my gluProject code:
IntBuffer viewport = GLAllocation.createDirectIntBuffer(16);
FloatBuffer modelview = GLAllocation.createDirectFloatBuffer(16);
FloatBuffer projection = GLAllocation.createDirectFloatBuffer(16);
FloatBuffer objectCoords = GLAllocation.createDirectFloatBuffer(3);
GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelview);
GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projection);
GL11.glGetInteger(GL11.GL_VIEWPORT, viewport);
GLU.gluProject(x, y, z, modelview, projection, viewport, objectCoords);
eturn objectCoords;
Thanks.