Quote:
Originally Posted by vital2k
|
Quote:
Originally Posted by Meta
And you didn't read ...
He wants to find the coordinates of the ground he's LOOKING AT.
pawn Код:
stock Float:DistanceCameraTargetToLocation(Float:CamX, Float:CamY, Float:CamZ, Float:ObjX, Float:ObjY, Float:ObjZ, Float:FrX, Float:FrY, Float:FrZ) { new Float:TGTDistance;
// get distance from camera to target TGTDistance = floatsqroot((CamX - ObjX) * (CamX - ObjX) + (CamY - ObjY) * (CamY - ObjY) + (CamZ - ObjZ) * (CamZ - ObjZ));
new Float:tmpX, Float:tmpY, Float:tmpZ;
tmpX = FrX * TGTDistance + CamX; tmpY = FrY * TGTDistance + CamY; tmpZ = FrZ * TGTDistance + CamZ;
return floatsqroot((tmpX - ObjX) * (tmpX - ObjX) + (tmpY - ObjY) * (tmpY - ObjY) + (tmpZ - ObjZ) * (tmpZ - ObjZ)); }
I use this for my ExtFire Filterscript ..
|
Quote:
Originally Posted by [DJ]Boki
|
Clearly neither of you have read my post correctly. I want a function that will allow me to GET the COORDINATES. Not detect if they are looking somewhere, and not to SET their camera. I want to be able to do (for example) CreateObject(id, camx, camy, camz, ...) like in MTA. I know it wouldn't be perfect like detecting objects but I just want to know if there is a function/script out that does that.