for starters, and depending on your camera movement rate and technique, there's a chance that the camera's z coord is
never exactly -375 as you're checking for in the code provided.
did you mean to check if it's
less-than or equal to, instead? ie,
?
see this "fly over" demo for the "collision" effect i
think you're trying to achieve:
sync on : sync rate 0
autocam off : set camera range 1.0 ,5000.0
make matrix 1, 1500.0, 1500.0, 10,10
position matrix 1, -750.0,0.0,-750.0
update matrix 1
camx# = 1000.0 : camy# = 1000.0 : camz# = 3000.0
position camera camx#, camy#, camz#
point camera 0.0,0.0,0.0
make object cube 1, 100.0
do
camz# = camz# -1.0
if camz# <= -375.0
camz# = 3000.0
endif
position camera camx#, camy#, camz#
point camera 0.0,0.0,0.0
set cursor 0,0
print camz#
sync
loop
Virtual Nomad @ California, USA . DBPro V7.7
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit