30.11.2015, 17:20
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?
Thanks
Код:
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)); }