hi guy thanks for the help. I manage to fix it by changing the camera position and camera rotation
it was like this

function camera_follow(ENTITY* chrac)
{
while(1) {
vec_set(camera.x,vector(-250,-45,45)); // camera position relative to the player
vec_rotate(camera.x ,chrac.pan); // rotate the camera position with the player
vec_add(camera.x,chrac.x); // add player position
vec_set(camera.pan,vector( chrac.pan,-10,0)); // look in player direction, slighty down
wait(1);
}
}

now it looks this


void camera_follow(ENTITY* chrac)
{
while(1)
{
vec_set(camera.x,vector(-40,250,50)); // camera position relative to the player
vec_rotate(camera.x ,chrac.pan); // rotate the camera position with the player
vec_add(camera.x,chrac.x); // add player position
vec_set(camera.pan,vector( chrac.pan - 90,-10,0)); // look in player direction, slighty down
//camera.x=chrac.x-300*cos(chrac.pan);
//camera.y=chrac.y-300*sin(chrac.pan);
//camera.z=chrac.z+20;
//camera.pan=chrac.pan;

wait(1);
}

Progger i dint use your code grin. But it help me a lot thanks again.
Rei_Ayanami you were right about the origin. my player was facing the wrong way in med software.

Thanks guys GOD BLESS grin