Hi Ben Hartnett,
I took a look at your code and made a few changes to make it work. I couldn't see through the player sphere, so I had it just show the wireframe. I created a cube for object #6 and colored the skysphere a purplish color. I put in a green box for the ground so you could see the player move. Take a look:
sync on : Sync Rate 30
autocam off
Make object sphere 10,50
set object wireframe 10,1
Position object 10,0,30,0
make object collision box 10,-25.0,-25.0,-25.0,25.0,25.0,25.0,1
rem load object
make object cube 6,50
position object 6,150,30,150
make object collision box 6,-25.0,-25.0,-25.0,25.0,25.0,25.0,1
`load object "example.x",6
rem skybox
`load image "sky.bmp", 1
skysphere = 1
rem the skysphere
make object sphere skysphere, 3000
`texture object skysphere, 1
scale object skysphere,-100,-100,-100
color object skysphere,rgb(255,67,200)
set object ambience skysphere,rgb(255,67,200)
set object collision off skysphere
set object cull skysphere, 0
rem make ground
make object box 2,1000,10,1000
color object 2,rgb(0,220,0)
make object collision box 2,-500.0,-5.0,500.0,500.0,5.0,500.0,0
do
Rem Store Object angle Y in aY#
aY# = Object angle Y(10)
rem store coordinates
oldX# = Object position x(10)
oldZ# = Object position z(10)
Rem Control input for camera
If Upkey() = 1 then Move object 10,10.0
if downkey() = 1 then move object 10,-10.0
If Leftkey() = 1 then Yrotate object 10,Wrapvalue(aY# - 5.0)
If Rightkey() = 1 then Yrotate object 10,Wrapvalue(aY# + 5.0)
Rem Detect collision
collide = Object collision(10,0)
if collide > 0
rem put the player back where he was
position object 10,oldX#,30.0,oldZ#
endif
Rem get new camera position and store in cZ# and cX#
` cZ# = Newzvalue(Z#,aY#-180,100)
` cX# = Newxvalue(X#,aY#-180,100)
Rem get player object position and store in X# and Z#
X# = Object position x(10)
Z# = Object position z(10)
Rem position camera
Position Camera x#,100.0,z#
set camera to object orientation 10
move camera -100.0
Rem point the camera at the player object
Point camera X#,30,Z#
Rem Refresh Screen
text 10,100,"collide = " + str$(collide)
Sync
loop
I wondered why the movement was slow and text flickered when printed on the screen and I noticed you set the sync rate without turning SYNC ON. Basically, this code looks at the position of the player's sphere prior to checking for collision. If it sees a collision, it puts it back where it was before. Also, I put in where you could simply back up if you run into something. It prints the value of COLLIDE so you can see the number of the object you are colliding with.
Hope this is helpful to you.
LB
So many games to code.....so little time.