I'm still getting the exact same result as before with the code you suggested Scorpyo, but thanks anyway.
Current code :
Sync On : Hide Mouse
`----------------( Setup Matrix )------------------------------------------
PRINT "LOADING....."
WAIT 10
LOAD OBJECT "MAP.x",1
LOAD IMAGE "CYGRASS1.bmp",1
POSITION OBJECT 1,0,0,0
TEXTURE OBJECT 1,1
MAKE OBJECT CUBE 10,5
`----------------( Main loop )-------------------------------------------
Do
`Control input for camera
If Upkey()=1 then Move object 10,1
If Leftkey()=1 then Yrotate object 10,Wrapvalue(Object Angle Y(10)-5)
If Rightkey()=1 then Yrotate object 10,Wrapvalue(Object Angle Y(10)+5)
Yrotate Object 10,wrapvalue(Object Angle Y(10)+MouseMoveX())
`Slide Object On Matrix
`Chase Object With 3rd Person Camera
`Display Frames Per-Second
Set Cursor 1,1 : Print Screen FPS()
Sync
Loop
Function _ChaseObject(ObjectNum,Dist,Hei,MatrixNum)
`Store Object angle Y in aY#
aY# = Object angle Y(10)
`get player object position and store in X# and Z#
X# = Object position x(ObjectNum)
Z# = Object position z(ObjectNum)
th#=intersect object(1,x#,10000,z#,x#,-10000,z#)
y#=10000-th#
position object 10,x#,y#,z#
`get new camera position and store in cZ# and cX#
cZ# = Newzvalue(Z#,aY#-180,DIST)
cX# = Newxvalue(X#,aY#-180,DIST)
cy#=y#+100
`position camera
Position Camera cX#,cY#+200,cZ#
`point the camera at the player object
Point camera X#,th#+5,Z#
EndFunction
[center]