For me RotateEntity doesn't always do the job. For example when i did my spaceship movement code, i got problems with RotateEntity. When looking straight up Y+ or down Y-, the movement was not what i expected. Turn entity solved this
problem for me. So instead of:
//Rotate Cam
camrotation.Y=camrotation.Y+rotate;
RotateEntity(player,camrotation,1);
you could write:
//Rotate Cam
TurnEntity(player, vec3(0.0F, rotate, 0.0F), 1);
But that doesn't fix your problem, though.
ZioRed's code looks like it's what your looking for, but you can do the same thing with a little less code.
You can shrink:
//Position the camera
TVec3 playerpos=EntityPosition(player);
PositionEntity(campiv, playerpos);
RotateEntity(campiv, EntityRotation(player));
MoveEntity(campiv, Vec3(0, 1.75, -5));
down to:
//Position the camera
SetEntityMatrix(campiv, GetEntityMatrix(player));
MoveEntity(campiv, Vec3(0, 1.75, -5));
Hope this helps