question
#2

If you mean the absolute distance

(not tested)
Код:
public IsObjectToPoint(ObjectID, PX, PY, PZ)
{
new Float:OX, Float:OY, Float:OZ, Float:Diff;
GetObjectPos(ObjectID, OX, OY, OZ);
Diff = floatsqrt(floatpower(PX - OX, 2) + floatpower(PY - OY, 2) + floatpower(PZ - OZ, 2));
return Diff;
}
Pythagoras
Reply


Messages In This Thread
question - by iJumbo - 31.10.2010, 15:04
AW: question - by Arrows73 - 31.10.2010, 15:10
Re: question - by iJumbo - 31.10.2010, 16:02
Re: question - by joeri55 - 31.10.2010, 16:30

Forum Jump:


Users browsing this thread: 1 Guest(s)