26.12.2013, 13:33
(
Последний раз редактировалось Riddick94; 26.12.2013 в 15:29.
)
Hi!
All right, so.. here's the code to set the camera right behind the player:
But I also want to move camera NEXT to the player after setting in behind him, so here's the code to move the camera:
But it doesn't do a trick, because sometimes camera is moving different direction (i.e. left, when it should move right). What else do I have to count, player's angle or something? Actually I don't know.
Thanks!
All right, so.. here's the code to set the camera right behind the player:
pawn Код:
stock SetCameraNextToPlayer(playerid)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerCameraLookAt(playerid, X, Y, Z);
GetXYInFrontOfPlayer(playerid, X, Y, -3.0);
SetPlayerCameraPos(playerid, X, Y, Z);
return true;
}
pawn Код:
InterpolateCameraPos(playerid, X, Y, Z, X + 1.0, Y, Z, 2000);
Thanks!