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

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.
Reply
#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
#3

Quote:
Originally Posted by Admigo
Посмотреть сообщение
You can make that by yourself by detecting the distance between you and the target.
You did not get my point. I meant, you can not detect objects/vehicles/players in the world with these functions if the distance between them and player's camera position is more than 40. Also, I'm not really sure which my question did you try to answer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)