Get XYZ in front of object? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Get XYZ in front of object? (
/showthread.php?tid=595274)
Get XYZ in front of object? -
zaibaslr2 - 30.11.2015
Hello, I have function to find X and Y in front of object, but how do I find Z coordinate according to object's X rotation?
Код:
GetXYInFrontOfObjectl(anid, &Float:ex, &Float:ey, Float:distance)
{
new Float:ar = Animal[anid][rotZ];
new Float:unused;
GetDynamicObjectPos(Animal[anid][anOID], ex, ey, unused);
ex += (distance * floatsin(-ar, degrees));
ey += (distance * floatcos(-ar, degrees));
}
Thanks
Re: Get XYZ in front of object? -
AbyssMorgan - 30.11.2015
https://github.com/AbyssMorgan/ADM/b...SAM/3DTryg.inc
GetPointInFront3D
Re: Get XYZ in front of object? -
zaibaslr2 - 30.11.2015
Quote:
Originally Posted by AbyssMorgan
|
Thanks a lot!