ok,
step by step,
you wiil have to use either math (getting the distance between the camera and objects) or the built in collision.
the first step is to get the current camera x,y,z positions and store them to variables. after this is you can place the camera in its new position and check for possible collision. If collision returns true , you then reposition the camera back to its original position using the stored variables. in the example code I'm storing only the x and z positions because the y remains constant and I am using object # 23 to test for collision (you can add the code to make the object number of your choice)
do
`store old values
oldx#=camera position x() : oldz#=camera position z()
if upkey()=1
` move camera to the new position
move camera 2
`store new position of camera
newx#=camera position x()
newz#=camera position z()
`move testing object to new position
position object 23,newx#,0,newz#
` check for collision of other objects such as walls
hitter=object collision(23,0)
if hitter>0
` if collision is true reposition the camera back
` to the original position
position camera oldx#,0,oldz#
endif
endif
sync
loop
I think you can take it from here.
----------------
Gamerboots~