for any one else showing up this is the complected file
Rem ***** Main Source File *****
rem basic things
phy start:sync on:sync rate 60:autocam off:backdrop on
color backdrop RGB(0,35,188):phy set gravity 0,-80,0
hide mouse
rem player
make object sphere 1,20
position object 1,0,40,0
phy make rigid body dynamic sphere 1
rem other objects (static)
make object box 2,1200,20,1200
color object 2,rgb(0,200,25)
make object cube 3,20
position object 2,0,-20,0
position object 3,0,0,50
for c=2 to 3
phy make rigid body static box c
next c
jumping = 0
x# = object position x(1)
y# = object position y(1)
z# = object position z(1)
position camera x#,y# + 100,z# - 200
point camera x#,y#,z#
ink rgb(0,0,255),0
do
phy add rigid body force 1,0,-5,0,2
ax# = object angle x(1) : ay# = object angle y(1) : az# = object angle z(1)
if upkey()=1
xf# = 0.0 : zf# = 0.0
xf# = newxvalue( xf#,Camy#,2.0)
zf# = newzvalue( zf#,Camy#,2.0)
phy add rigid body force 1,xf#,0,zf#,2
endif
if downkey() = 1
xf# = 0.0 : zf# = 0.0
xf# = newxvalue( xf#,Camy#,2.0)
zf# = newzvalue( zf#,Camy#,2.0)
phy add rigid body force 1,-xf#,0,-zf#,2
endif
if leftkey() = 1
xf# = 0.0 : zf# = 0.0
xf# = newxvalue( xf#,wrapvalue(Camy#+90),8.0)
zf# = newzvalue( zf#,wrapvalue(Camy#+90),8.0)
phy add rigid body force 1,-xf#,0,-zf#,2
endif
if rightkey() = 1
xf# = 0.0 : zf# = 0.0
xf# = newxvalue( xf#,wrapvalue(Camy#-90),8.0)
zf# = newzvalue( zf#,wrapvalue(Camy#-90),8.0)
phy add rigid body force 1,-xf#,0,-zf#,2
endif
if jumping = 1
velY# = phy get rigid body linear velocity y ( 1 )
if Vely# >= -0.5 and Vely# <= 0.5 then jumping = 0
endif
if spacekey() = 1 and jumping = 0
jumping = 1
phy add rigid body force 1,0,150,0,2
endif
` check to see if it is still jumping
text 10,200,"jumping = " + str$(jumping)
phy update
sync
loop
If a thought is Just a thought ~ so whats the main thought ?