08.11.2013, 04:54
I'm not sure if that one will work, when I did this I got some specialized function it's on my other HD I just need to dig it out.
Ok I dug it out like from the depths of the forums lol.
I did have to use this once when making this include https://sampforum.blast.hk/showthread.php?tid=415397
Source: https://sampforum.blast.hk/showthread.php?tid=361844
Ok I dug it out like from the depths of the forums lol.
I did have to use this once when making this include https://sampforum.blast.hk/showthread.php?tid=415397
pawn Код:
QuatToEulerZXY(Float:quat_x, Float:quat_y, Float:quat_z, Float:quat_w, &Float:x, &Float:y, &Float:z)
{
x = -asin(2 * ((quat_x * quat_z) + (quat_w * quat_y)));
y = atan2(2 * ((quat_y * quat_z) + (quat_w * quat_x)), (quat_w * quat_w) - (quat_x * quat_x) - (quat_y * quat_y) + (quat_z * quat_z));
z = -atan2(2 * ((quat_x * quat_y) + (quat_w * quat_z)), (quat_w * quat_w) + (quat_x * quat_x) - (quat_y * quat_y) - (quat_z * quat_z));
return 1;
}