SA-MP Forums Archive
Convert IPL to PWN (Rotation not correct) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Convert IPL to PWN (Rotation not correct) (/showthread.php?tid=138771)



Convert IPL to PWN (Rotation not correct) - Programie - 03.04.2010

Hi,

I want to convert maps made with MEd a pawn script.
I already found the solution to convert Quaternion to Euler Angles for rotation.
My converter says 150,30,0 (rotation X,Y,Z). And MEd also shows 150,30,0 for the rotation.
But if I try to use these values for the rotation in CreateObject the in-game object rotation is wrong.

Here the code I used to write my converter: http://www.darwin3d.com/gamedev/quat2eul.cpp


What did I do wrong?


AW: Convert IPL to PWN (Rotation not correct) - Arrows73 - 18.07.2011

Probably this could help you:

Quote:

The PAWN code is not incorrect, the functions GTA uses to rotate the objects are incorrect. IIRC z rotation is done around the world's z axis, x and y rotation are done around the object's x and y axies respecitvely.

Found that on another board, I'm having a similar issue (see my post).

This most likely won't help you anymore, but probably it will help other users.