'Drop' camera with GetPlayerCameraPos
#1

I've never used GetPlayerCameraFrontVector before. From what I've heard, it returns the position of the player's camera's 'lookat pos' which is 1 meter in front. If this correct?

I'd like to make a /dropcam command that 'drops' their camera, so it doesn't follow them any more.

FIXED:

pawn Код:
new Float:camPos[3], Float:camVector[3];
GetPlayerCameraPos(playerid, camPos[0], camPos[1], camPos[2]);
GetPlayerCameraFrontVector(playerid, camVector[0], camVector[1], camVector[2]);
SetPlayerCameraPos(playerid, camPos[0], camPos[1], camPos[2]);
SetPlayerCameraLookAt(playerid, camPos[0]+camVector[0], camPos[1]+camVector[1], camPos[2]+camVector[2]);
The vectors have to be added to the camera pos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)