that done by moving the the character in the direction you wish to go, however to to do strafing you will need to move the object to face the direction you wish to straf then put it back to facing forward.
` this program shows how to load an FPS Creator level
` and walk around it using the character controller
phy enable debug
` 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
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
rem move object to the left while looking forward.<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
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.