Hi guys. Was wondering if anyone could advise me of how to adjust the camera to follow the guy from behind rather than from the right. Heres the code so far...
Rem Project: LURKS OBLIVION
Rem Created: Saturday, March 31, 2012
REM setup
sync on : sync rate 60
set display mode 1024,768,32
autocam off
REM TERRAIN
mapsize=500
segments=64
make matrix 1,mapsize,mapsize,segments,segments
load image "heightmap.bmp",1
size=256
load image "texture.bmp",2
prepare matrix texture 1,2,1,1
cls
paste image 1,0,0
modifier=size/segments
for x = 0 to segments
for y = 0 to segments
pixelcolor#=rgbr(point(x*modifier,y*modifier))
set matrix height 1,x,y,pixelcolor#
next x
next y
update matrix 1
REM dude
load object "H-Alien Mutant-Move.x", 1
set object smoothing 1, 0
set object speed 1, 50
yrotate object 1,180
REM SKY
mapsize=500
sky=5001
load image "benny.png",sky
make object sphere sky,(-mapsize*2)
texture object sky,sky
position object sky,mapsize/2,0,mapsize/2
rem make a cylinder"
load image "dsc0001c.bmp",500
make object cylinder 500, 1
texture object 500, 500
position object 500, 0,0,0
REM loop
do
REM controls
if rightkey()=1
turn object right 1,1
loop object 1,5,25
endif
if leftkey()=1
turn object left 1,1
loop object 1,5,25
endif
if upkey()=1
move object 1, -0.05
loop object 1,5,25
endif
if downkey()=1
move object 1, 0.05
loop object 1,5,25
endif
if scancode()=0
stop object 1
set object frame 1, 1
endif
REM camera
set camera to follow object position x(1), object position y(1), object position z(1), 0, 3, 1.5, 10, 0
point camera object position x(1), object position y(1), object position z(1)
REM simple gravity
y#=get ground height(1,object position x(1),object position z(1))
position object 1, object position x(1), y#, object position z(1)
REM sync
sync
REM end
loop