Hi Kent,
in Dr.Aeraix we used TBGL_EntitySyncAxes - which simply served to synchronize axes of two existing entities (rocket inherited rotation from camera).
The demo is still here.
Are you sure about TBGL_EntityGet{X|Y|Z}Axis not working? Did you had passed x, y, z defined as floating point?
See this example, seems to work:
[code=thinbasic]
Uses "TBGL"
' -- Create and show window
Dim hWnd As Dword = TBGL_CreateWindowEx("Mad rotations", 640, 480, 32, %TBGL_WS_WINDOWED or %TBGL_WS_CLOSEBOX)
TBGL_ShowWindow
' -- Create scene
%SCENE1 = 1
TBGL_SceneCreate(%SCENE1)
' -- Create basic entities
%eBox = 20
' -- Create something to look at
TBGL_EntityCreateBox(%SCENE1, %eBox, 0, 1, 1, 1, 0, 255, 128, 0)
TBGL_EntitySetPos(%SCENE1, %eBox, 0, 0, 0)
dim x, y, z as double
dim AxesString as string= "Original axes:"+$CRLF+$CRLF
TBGL_EntityGetXAxis(%SCENE1, %eBox, x, y, z)
AxesString+= "X:"+$TAB+using$("#.## #.## #.##", x, y, z)+$CRLF
TBGL_EntityGetYAxis(%SCENE1, %eBox, x, y, z)
AxesString+= "Y:"+$TAB+using$("#.## #.## #.##", x, y, z)+$CRLF
TBGL_EntityGetZAxis(%SCENE1, %eBox, x, y, z)
AxesString+= "Z:"+$TAB+using$("#.## #.## #.##", x, y, z)+$CRLF
tbgl_entitySetRot(%SCENE1, %eBox, 10, 20, 30)
AxesString+= REPEAT$(60, "-")+$CRLF+"After tbgl_entitySetRot(%SCENE1, %eBox, 10, 20, 30):"+$CRLF+$CRLF
TBGL_EntityGetXAxis(%SCENE1, %eBox, x, y, z)
AxesString+= "X:"+$TAB+using$("#.## #.## #.##", x, y, z)+$CRLF
TBGL_EntityGetYAxis(%SCENE1, %eBox, x, y, z)
AxesString+= "Y:"+$TAB+using$("#.## #.## #.##", x, y, z)+$CRLF
TBGL_EntityGetZAxis(%SCENE1, %eBox, x, y, z)
AxesString+= "Z:"+$TAB+using$("#.## #.## #.##", x, y, z)+$CRLF
msgbox hwnd, AxesString
TBGL_DestroyWindow
[/code]
Hope it will work for you too
Petr
Bookmarks