12.05.2012, 15:15
Hi guys,
So, is it possible, to get camera coords which will return SetCameraBehindPlayer function if I know player position and angle? I think there is offset from player position... But I don't know, how to calculate it.
I tried this way(after using SetCameraBehindPlayer function), but I'm getting different results...
I need this, because I want to make something like SetCameraBehindPlayer( playerid, CAMERA_MOVE )(using InterpolateCameraPos)
If someone will help me to calculate, I will be very thankful ^^.
Thank you very much!
So, is it possible, to get camera coords which will return SetCameraBehindPlayer function if I know player position and angle? I think there is offset from player position... But I don't know, how to calculate it.
I tried this way(after using SetCameraBehindPlayer function), but I'm getting different results...
pawn Код:
new
Float:zPos[ 3 ],
Float:cPos[ 3 ],
string[ 100 ]
;
GetPlayerPos( playerid, zPos[ 0 ], zPos[ 1 ], zPos[ 2 ] );
GetPlayerCameraPos( playerid, cPos[ 0 ], cPos[ 1 ], cPos[ 2 ] );
format( string, sizeof( string ), "%f, %f, %f", zPos[ 0 ] - cPos[ 0 ], zPos[ 1 ] - cPos[ 1 ], zPos[ 2 ] - cPos[ 2 ] );
SendClientMessage( playerid, 0xFF0000FF, string );
If someone will help me to calculate, I will be very thankful ^^.
Thank you very much!