i made a simple little program and the camera will follow my object wherever i go but when the obj turns i want the camera to continuosly point at its back like a chase cam heres my source :
load object "c:\windows\desktop\project\walk.x",1
set object speed 1,50
x=0
y=0
z=0
camx=x-75
camy=50
camz=z-75
pointobj=0
scale object 1,25,25,25
position object 1,x,y,z
make matrix 1,1000.0,1000.0,25,25
position camera camx,camy,camz
point camera 1000,camy,1000
do
camx=object position x(1)
camz=object position z(1)
rotate object 1,0,255+pointobj,0
position camera camx-100,50,camz-100
if upkey()=1 and shiftkey()=1
set object speed 1,85
move object 1,-3
move camera -3
play object 1
endif
if upkey()=1 and shiftkey()=0
set object speed 1,50
move object 1,-1
move camera -1
play object 1
endif
if downkey()=1 and shiftkey()=1
set object speed 1,85
move object 1,3
move camera 3
play object 1
endif
if downkey()=1 and shiftkey()=0
set object speed 1,50
move object 1,1
move camera 1
play object 1
endif
if leftkey()=1 and shiftkey()=1
set object speed 1,85
pointobj=pointobj-3
play object 1
endif
if leftkey()=1 and shiftkey()=0
set object speed 1,50
pointobj=pointobj-1
play object 1
endif
if rightkey()=1 and shiftkey()=1
set object speed 1,85
pointobj=pointobj+3
play object 1
endif
if rightkey()=1 and shiftkey()=0
set object speed 1,85
pointobj=pointobj+1
play object 1
endif
loop