hmmm
Something like this?
`Roll by Eliot Cowley
`Objects: 2
`Images: 0
`Sounds: 0
`Music: 0
`Lights: 1
ink RGB(255,255,255),RGB(0,0,0)
color backdrop RGB(10,10,10)
set ambient light 50
`Setup
Sync on
Sync rate 60
Autocam off
Backdrop on
Phy start
Make light 1
Position light 1,200,100,100
Set directional light 1,-5,-5,-5
Position camera 0,50,-100
Point camera 0,0,0
Phy set gravity 0.0,-11.0,0.0
`Make ground
Make object box 1,100,1,100
Position object 1,0,0,0
Phy make rigid body static box 1
Color object 1,RGB(rnd(255),rnd(255),rnd(255))
`Make sphere
Make object sphere 2,20
Position object 2,0,50,0
Color object 2,RGB(rnd(255),rnd(255),rnd(255))
Phy make rigid body dynamic sphere 2
Do
aax#=phy get rigid body linear velocity x(2)
aay#=phy get rigid body linear velocity y(2)
aaz#=phy get rigid body linear velocity z(2)
mytext$=" aax#="+str$(aax#)+" aay#="+str$(aay#)+" aaz#="+str$(aaz#)
center text screen width()/2,5,mytext$
If leftkey() = 1
Phy set rigid body linear velocity 2,-10,aay#,0
Endif
If rightkey() = 1
Phy set rigid body linear velocity 2,10,aay#,0
Endif
If upkey() = 1
Phy set rigid body linear velocity 2,0,aay#,10
Endif
If downkey() = 1
Phy set rigid body linear velocity 2,0,aay#,-10
Endif
Phy update
Sync
Loop