24.05.2009, 06:55
pawn Код:
SetPlayerPos(playerid, SavePos[playerid][picX], SavePos[playerid][picY], SavePos[playerid][picZ]+10); // so the player isn't visible.
// SetPlayerFacingAngle() is unnecessary, this rotates the player in the world. We are dealing strictly with cameras.
SetPlayerCameraPos(playerid, SavePos[playerid][picX], SavePos[playerid][picY], SavePos[playerid][picZ]);
#define DISTANCE 10.0
SetPlayerCameraLookAt(playerid, SavePos[playerid][picX] + DISTANCE * floatsin(-SavePos[playerid][picA], degrees), SavePos[playerid][picY] + DISTANCE * floatcos(-SavePos[playerid][picA], degrees), SavePos[playerid][picZ]);
Changing DISTANCE to a larger value will change the Camera Look at location to a point that is farther away from the Camera.