Camera behind player coords
#1

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...
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 );
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!
Reply


Messages In This Thread
Camera behind player coords - by zgintasz - 12.05.2012, 15:15
Re: Camera behind player coords - by zgintasz - 12.05.2012, 17:48
Re: Camera behind player coords - by MP2 - 12.05.2012, 18:53
Re: Camera behind player coords - by zgintasz - 13.05.2012, 08:15
Re: Camera behind player coords - by zgintasz - 14.05.2012, 12:42

Forum Jump:


Users browsing this thread: 1 Guest(s)