plz help quaternion help plz plz
#5

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

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;
}
Source: https://sampforum.blast.hk/showthread.php?tid=361844
Reply


Messages In This Thread
[plz plyyz help +rep] quaternion to euler - by Baltazar - 08.11.2013, 00:49
Re: plz help quaternion help plz plz - by Babul - 08.11.2013, 04:25
Re: plz help quaternion help plz plz - by SAMProductions - 08.11.2013, 04:28
Re: plz help quaternion help plz plz - by SAMProductions - 08.11.2013, 04:43
Re: plz help quaternion help plz plz - by Pottus - 08.11.2013, 04:54

Forum Jump:


Users browsing this thread: 2 Guest(s)