Besides using gltranslate but I am looking for a way to get the X,Y,Z offset from obtaining, the original position, the orientation, and the offset coordination.
(notice I also posted the same thing from a different forum but wanted to see how this can be done in Freebasic way)
Example, I want to offset my gunpoints as in (-2,0,1) and (2,0,1), I would actually need 6 return varaibles.
Like, GetOffsetX(NormalX,NormalY,NormalZ,AngleX,AngleY,AngleZ,OffsetX,OffsetY,OffsetZ)
Would be like:
GunPointX(1) = GetOffsetX(0,100,1000,0,90,45,-2,0,1)
GunPointY(1) = GetOffsetY(0,100,1000,0,90,45,-2,0,1)
GunPointZ(1) = GetOffsetZ(0,100,1000,0,90,45,-2,0,1)
GunPointX(2) = GetOffsetZ(0,100,1000,0,90,45,2,0,1)
GunPointY(2) = GetOffsetZ(0,100,1000,0,90,45,2,0,1)
GunPointZ(2) = GetOffsetZ(0,100,1000,0,90,45,2,0,1)
How hard would this be?
How can offsetting be done??
Code: Select all
Dim glMatrix(15) as Single
'You can also load it into a 2 dimensional array....
'glMatrix(3,3) or glMatrix(1 to 4, 1 to 4)
'Do Translation
'Do Rotation
glGetFloatV GL_MODELVIEW_MATRIX @glMatrix(0)