Try the search button? There are some various techniques people have posted. I don't know if they are flawless though. I've had trouble with it myself.
EDIT:
Here's my best attempt at it, no character controller though. But it does utilize DP commands... First person, WASD, mouse to look around. Screen starts black as the player falls to the floor, so wait a few seconds before considering it broken
I think this is modified code from General Reed's post about an alternative to the CC.
sync on
sync rate 60
backdrop on
autocam off
color backdrop rgb(0,0,0)
set camera range 0.1,10000
phy start
phy make material 1,"player"
phy set material restitution 1, 0.0
phy set material dynamic friction 1, 0.1
phy set material static friction 1, 0.1
phy build material 1
`Loading
make object box 1,10,2,10
`phy make material 1, "ice"
`phy set material dynamic friction 1, 5
`phy build material 1
phy make rigid body static box 1, 1
make object box 10,10,2,10
position object 10,-5,-2,0
`phy make material 1, "ice"
`phy set material dynamic friction 1, 0.001
`phy build material 1
phy make rigid body static box 10, 1
`make the player object
make object sphere 300,1
position object 300,0,20,0
make object sphere 301,1
`hide object 301
phy make rigid body dynamic sphere 301,1
position object 301,0,20,0
phy set rigid body mass 301,100
rotate camera 45,45,0
make object cube 500,0.5
position object 500,2,10,2
phy make rigid body dynamic box 500
phy set rigid body mass 500,3
` our main loop
do
phy set rigid body linear damping 301,8
position object 300,object position x(301),object position y(301),object position z(301)
` rotate and position the camera based on the box controller
OldCamAngleY# = CameraAngleY#
OldCamAngleX# = CameraAngleX#
CameraAngleY# = wrapvalue ( CameraAngleY# + mousemovex ( ) * 0.4 )
CameraAngleX# = wrapvalue ( CameraAngleX# + mousemovey ( ) * 0.4 )
yrotate object 300, curveangle ( CameraAngleY#, OldCamAngleY#, 24 )
xrotate camera curveangle ( CameraAnglex#, OldCamAnglex#, 24 )
if keystate(42)=1
speed#=0.02
else
speed#=0.04
endif
if keystate(17)=1
move object 300, speed#
endif
if keystate(31)=1
move object 300, -speed#
endif
if keystate(30)=1
move object left 300, speed#
endif
if keystate(32)=1
move object right 300, speed#
endif
if keystate(57)=1 and jump=0
jump=1
jumpspeed#=0.2
endif
if jump=1
jumpspeed#=jumpspeed#-0.01
endif
if jumpspeed#<=0
jumpspeed#=0
endif
rx#=object position x(300)
ry#=object position y(300)
rz#=object position z(300)
phy set rigid body position 301, rx#, ry#+1, rz#
value = phy ray cast all shapes( rx#, ry#, rz#, 0, -1, 0)
phy set rigid body position 301, rx#, ry#, rz#
ground# = phy get ray cast distance( )
text 20,65, str$(ground#)
gravity#=-0.07
if ground#>0.5
move object up 300,gravity#
else
jump=0
endif
move object up 300,jumpspeed#
text 20,20,str$( screen fps())
text 20,45, str$(PHY GET RAY CAST OBJECT())
` update the simulation and screen
position camera object position x(300),object position y(300),object position z(300)
rotate camera camera angle x(),object angle y(300),object angle z(300)
phy set rigid body position 301, object position x(300),object position y(300),object position z(300)
phy set rigid body rotation 301, object angle x(300),object angle y(300),object angle z(300)
phy update
sync
loop