Here is my code...I really need help, I am more of a newbie than I thought. My sphere (body.x) floats endlessly above most of the terrain, but when it does reach a hill top (room.x) it goes right through it.
code as follows
SET DISPLAY MODE 1024, 768, 16
sync rate 60 : hide mouse
load object "./objects/body.x",1
load object "./objects/room.x",2
rem body move
do
if upkey()=1 then move object 1,4
if downkey()=1 then move object 1,-4
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-4)
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+4)
rem follow body with camera
x#=object position x(1)
y#=object position y(1)
z#=object position z(1)
while object collision(2,1)=2
y#=y#+1:`use a higher number if you want it a little quicker. However,
`doing it will make this uglier! Your decision, here...
position object 1,x#,y#,z#
endwhile
a#=object angle y(2)
d#=50.0
h#=85.0
s#=50.0
set camera to follow x#,y#,z#,a#,d#,h#,s#,1
loop