function RTS_Camera()
RTSCX=camera position x(RTSCamera)
RTSCY=camera position y(RTSCamera)
RTSCZ=camera position z(RTSCamera)
GH#=get terrain ground height(1,RTSCX,RTSCZ)-RTSCY
if mousey()=>(screen height()-20)
position camera RTSCamera,RTSCX,GH#,RTSCZ-2
endif
if mousey()<5
position camera RTSCamera,RTSCX,GH#,RTSCZ+2
endif
if mousex()=>(screen width()-20)
position camera RTSCamera,RTSCX+2,GH#,RTSCZ
endif
if mousex()<5
position camera RTSCamera,RTSCX-2,GH#,RTSCZ
endif
if mousez()<0
position camera RTSCamera,RTSCX,RTSCY-2,RTSCZ
endif
if mousez()>0
position camera RTSCamera,RTSCX,RTSCY+2,RTSCZ
endif
endfunction
I want the camera to follow the contour of the advance terrain
My function does it but the terrain flickers! Any ideas?