ok, I am using the character demo, this what I have done, still trying to get the model the right way up.
` this program shows how to load an FPS Creator level
` and walk around it using the character controller
` set up general properties
sync on
sync rate 60
autocam off
phy start
set camera range 0.5, 30000
hide mouse
` move into the media directory
set dir "media"
` load the level and make a static mesh for it
load object "universe.dbo", 1
set object light 1, 0
phy make rigid body static mesh 1
` load our skybox
load object "skybox2.x", 2
set object light 2, 0
set object texture 2, 3, 1
scale object 2, 30000, 30000, 30000
` come out of the media directory
set dir ".."
` create our box controller
`make object box 3, 20, 50, 20
load object "C:\Program Files\Dark Basic Software\Dark Basic Professional\Media\Models\Colonel Z\colz.x",3
rotate object 3,90,0,0
fix object pivot 3
`phy make box character controller 3, 434, object size y(3), -517, object size y(3)/2, 35, 10, 1, 10.5, 45.0
phy make capsule character controller 3,434,42,-517,object size x(3)/2,object size y(3)/2,1,10.5,45.0
`hide object 3
` create our box controller
`make object box 3, 20, 50, 20
`phy make box character controller 3, 434, 42, -517, 10, 35, 10, 1, 10.5, 45.0
`hide object 3
` display Dark Physics logo
load image "logo.png", 100000
sprite 1, 0, 600 - 60, 100000
` our main loop
do
` display instructions
set cursor 0, 0
print "Using Dark Physics for collision detection of an FPS Creator level"
print "Use the arrow keys and mouse to move around"
` rotate and position the camera based on the box controller
position camera object position x ( 3 ), object position y ( 3 ) + 20, object position z ( 3 )
rotate camera object angle x ( 3 ), object angle y ( 3 ), object angle z ( 3 )
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = wrapvalue ( CameraAngleY# + mousemovex ( ) * 0.4 )
CameraAngleX# = wrapvalue ( CameraAngleX# + mousemovey ( ) * 0.4 )
yrotate object 3, curveangle ( CameraAngleY#, OldCamAngleY#, 24 )
xrotate object 3, curveangle ( CameraAngleX#, OldCamAngleX#, 24 )
` react to key presses and move the controller
key = 0
if upkey ( )
key = 1
phy move character controller 3, 200.0
endif
if downkey ( )
key = 1
phy move character controller 3, -200.0
endif
if shiftkey()
key = 1
text 0,30,"ping"
rotate object 3,0,-90,0
rotate camera 0,object angle y(3)+90,0
phy move character controller 3, 200.0
`position object 3,object position x(3)-30,object position y(3),object position z(3)
`PHY SET rigid body position 3, object position x(3)-30,object position y(3),object position z(3)
endif
if key = 0
phy move character controller 3, 0.0
endif
` update the simulation and screen
phy update
sync
loop
Dark Physics makes any hot drink go cold.