hey
sorry but i didnt understand what u ment in the 2nd part what u wrote. here is some example code
sync on
sync rate 30
set display mode 800,600,32
hide mouse
make object cube 1,20
make object cylinder 2,50
position object 2,300,0,300
do
aY#= object angle y(1)
if Upkey()=1
XTest# = Newxvalue(X#,aY#,20)
ZTest# = Newzvalue(Z#,aY#,20)
`If XTest#>0 and XTest#<100 and ZTest#>0 and ZTest#<500
Move object 1,10
endif
if Downkey()=1
XTest# = Newxvalue(X#,aY#,20)
ZTest# = Newzvalue(Z#,aY#,20)
`If XTest#>0 and XTest#<100 and ZTest#>0 and ZTest#<500
Move object 1,-6
endif
If Leftkey()=1
Yrotate object 1,Wrapvalue(aY#-10)
Endif
If Rightkey()=1
Yrotate object 1,Wrapvalue(aY#+10)
Endif
X2# = object position x(2)
Y2# = object position y(2)
Z2# = object position z(2)
dist# = sqrt((X#-X2#)^2+(Y#-Y2#)^2+(Z#-Z2#)^2)
if dist# < 40
position object 1,X#,10,Z#
endif
text 10,10,str$(dist#)
cZ# = Newzvalue(Z#,aY#-180,100)
cX# = Newxvalue(X#,aY#-180,100)
Position Camera cX#,75,cZ#
X# = Object position x(1)
Z# = Object position z(1)
Point camera X#,50,Z#
Rem Refresh Screen
Sync
loop
the problem seems to be that once dist < 40 the object is never going to move ever but i cant get the object out of taht radius once its entered it. anyway i think thats the problem
thanks
kR
kR