GetPlayerCameraTarget(Object/Vehicle/Player) Distance Limit
#2

Quote:
Originally Posted by Blantas
Посмотреть сообщение
The distance between player camera's position and object/vehicle/another player has to be less than 40 game units. Is it based on something (maybe game limitation?)? It would be nice if we could control it via a special function or maybe a server variable to optimize server's/client's resources usage.

p.s. Since, I don't want to create another thread, I will write it here...

Would it be possible to make GetPlayerCameraTargetPlayer and GetPlayerCameraTargetVehicle functions detect the player(vehicle the player is in) who runs these functions itself? Let's say you set player's camera position to a fixed spot and you walk/drive the player/player's vehicle right in front of the camera. For now, it doesn't detect that.
You can make that by yourself by detecting the distance between you and the target.
pawn Код:
new Float:x,Float:y,Float:z;
new targetobject=GetPlayerCameraTargetObject(playerid);
GetObjectPos(targetobject,x,y,z);
if(GetPlayerDistanceFromPoint(playerid, x,y,z)<=1.0)
{
    //do something
    return 1;
}
Reply


Messages In This Thread
GetPlayerCameraTarget(Object/Vehicle/Player) Distance Limit - by Blantas - 27.01.2015, 13:33
Re: GetPlayerCameraTarget(Object/Vehicle/Player) Distance Limit - by Admigo - 27.01.2015, 15:34
Re: GetPlayerCameraTarget(Object/Vehicle/Player) Distance Limit - by Blantas - 27.01.2015, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)