Hmm. Did some work on converting entity position to screen coords (for labels over objects etc.), but only the x position is correct.
The y Position keeps moving up for some odd reason.
I know the returned Y is reverse from normal.
Anyone?
I'm trying to do CameraProject for MiniB3D
The y Position keeps moving up for some odd reason.
I know the returned Y is reverse from normal.
' Object to screen stuff Method ObjectToScreen:TVector(Entity:TEntity) Local SX:Double Local SY:Double Local SZ:Double Local MVMatrix:Double[16] Local ProjMat:Double[16] Local VPort:Int[4] glGetDoublev(GL_MODELVIEW_MATRIX,Varptr MVMatrix[0]) glGetDoublev(GL_PROJECTION_MATRIX,Varptr ProjMat[0]) glGetIntegerv(GL_VIEWPORT,Varptr VPort[0]) gluProject(EntityX(Entity),EntityY(Entity),EntityZ(Entity),MVMatrix,ProjMat,VPort, Varptr SX, Varptr SY, Varptr SZ) Return TVector.Create(SX, SY, SZ) End Method
Anyone?
I'm trying to do CameraProject for MiniB3D
CameraProject camera,x#,y#,z# Parameters: camera - camera handle x# - world coordinate x y# - world coordinate y z# - world coordinate z