Here's some code

sync on

make object plain 50,20,20

xrotate object 50,80

make object cube 1,1

sync rate 60

set object cull 1,0

do

if joystick up() = 0 then u = joystick down()

if joystick down() = 0 then u = joystick up() * -1

if joystick left() = 0 then r = joystick right()

if joystick right() = 0 then r = joystick left() * -1

j5 = joystick fire x(5)

j7 = joystick fire x(7)

j1 = joystick fire x(2)

if j5 = 1 then camangle# = camangle# -3

if j7 = 1 then camangle# = camangle# +3

if u = -1

if r=1 then yangchang# =45

if r = 0 then yangchang# = 0

if r = -1 then yangchang# = -45

endif

if u = 0

if r=1 then yangchang# =90

if r = 0 then yangchang# = 0:notmove = 1

if r = -1 then yangchang# = -90

endif

if u = 1

if r=1 then yangchang# =135

if r = 0 then yangchang# = 180

if r = -1 then yangchang# = -135

endif

camangle# = wrapvalue(camangle#)

camdir# = camangle# + yangchang#

smove# = sin(camdir#) / 5

fmove# = cos(camdir#) / 5

ang# = 0

xmove# = smove# * (cos(ang#))

ymove# = sin(ang#) / 5

zmove# = fmove# * (cos(ang#))

if u<>0 or r<>0

xplay# = (xmove#)+xplay#

yplay# = (ymove#)+yplay#

zplay# = (zmove#)+zplay#

endif

set camera to follow xplay#,yplay#,zplay#,camangle#,6,2,4,0

position object 1,xplay#,yplay#,zplay#

rotate object 1,ang#,camangle#,0

sync

loop

Dbpro only

Life is a terminal disease.

You never survive it.