sync on
maxsize=5500
landsize=5500
make matrix 1,maxsize*2,maxsize*2,25,25
set matrix wireframe on 1
randomize matrix 1,42
dim ripple(25*26)
for t=0 to 25*25 : ripple(t)=rnd(600) : next t
make object box 1,150,20,900
make object box 2,100,50,500
scale object 2,900,900,900 :rem 75,75,75
yrotate object 2,90
fix object pivot 2
glue object to limb 2,1,0
x#=2500
z#=2500
xx#=0
zz#=0
do
x#=newxvalue(x#,a#,s#)
z#=newzvalue(z#,a#,s#)
s#=s#/1.2
h#=get ground height(1,x#-mx#,z#-mz#)
position object 1,x#,h#,z#
yrotate object 1,a#
rotate object 2,wrapvalue(length#/4.0),0,wrapvalue(across#/4.0)
if upkey()=1 and s#-10.0 then s#=s#-0.2
if leftkey()=1 then a#=wrapvalue(a#-0.1)
if rightkey()=1 then a#=wrapvalue(a#+0.1)
if inkey$()="w"
tx#=newxvalue(tx#,cya#,0.6) : tz#=newzvalue(tz#,cya#,0.6)
endif
if inkey$()="s"
tx#=newxvalue(tx#,cya#,-0.6) : tz#=newzvalue(tz#,cya#,-0.6)
endif
if inkey$()="a"
tx#=newxvalue(tx#,wrapvalue(cya#-90.0),0.3) : tz#=newzvalue(tz#,wrapvalue(cya#-90.0),0.3)
endif
if inkey$()="d"
tx#=newxvalue(tx#,wrapvalue(cya#+90.0),0.3) : tz#=newzvalue(tz#,wrapvalue(cya#+90.0),0.3)
endif
cya#=wrapvalue(cya#+(mousemovex()/3.0))
cxa#=cxa#+(mousemovey()/3.0)
if cxa#45.0 then cxa#=45.0
cx#=newxvalue(x#,cya#,sin(cxa#)*10)
cz#=newzvalue(z#,cya#,sin(cxa#)*10)
rotate camera wrapvalue(cxa#),cya#,0
rem position camera cx#,qqyo#+165,cz#
position camera x#+tx#,h#+126,z#+tz#
sync
I would be grateful if anyone could help me with this and i've been stuck on this for a few days, I'll try to enxplain, imagine the white box is a bus wich you can steer with arrow keys with you as camera on w,a,s,d keys with mouse look. Now if you move to the side of the bus with w,a,s,d, how is it possible whilst steering the bus in a circle to stay in the bus, while keeping the movekeys and mouselook active. I hope anyone can understand this. thanks