UncleCreepy Posted May 14, 2017 Share Posted May 14, 2017 (edited) Hi! First of all, I'm sorry if this is the wrong place to ask. I created some MTA maps which I would like to use in singleplayer GTA, and now I'm trying to convert those MTA objects to .ipl files. Some simple rotations (where only Z axis is rotated in MTA) are working well when I convert them, but others aren't. This site says that .ipl objects are created in this form: Quote ID, ModelName, Interior, PosX, PosY, PosZ, RotX, RotY, RotZ, RotW, LOD Then I found this XYZ to quaternion converter. Now here's two examples of that converter in action. When I take an object with simple rotation (example), input those rotations in converter to get quaternions, I come up with this line which works just fine in game: Quote 3265, privatesign4, 0, -575, -171.8, 77.4, 0, 0, 0.5, -0.866, -1 But then, when I want to convert some object with more complex rotations (like this one), I put them into converter like I did for previous one, and come up with this: Quote 1654, dynamite, 0, -561.57, -181.6, 78.31, -0.478, 0.521, -0.478, 0.521, -1 And then when I go test it in game, it is rotated completely wrong. So I'd like to know if there's a problem with this converter, or am I using it wrong or something. Is there any way to convert XYZ rotations to XYZW? Thanks! Edited May 14, 2017 by UncleCreepy Switched "code" fields to "quote" Link to comment
Simple0x47 Posted May 15, 2017 Share Posted May 15, 2017 Just search in google for quaternion euler converter online. Theres a simple website which allows you to make the conversion. And there q1 is the W and then q2 X etc. Link to comment
UncleCreepy Posted May 15, 2017 Author Share Posted May 15, 2017 (edited) Please read my post completely. I found the converter and input the XYZ coordinates from MTA, and get this: So when I write my .ipl in RotX, RotY, RotZ, RotW format which one of these should be correct? Quote -0.478, 0.521, -0.478, 0.521 0.521, -0.478, 0.521, -0.478 , Edit: Just tested both of these in game, none of them is correct. Edited May 15, 2017 by UncleCreepy Link to comment
Simple0x47 Posted May 18, 2017 Share Posted May 18, 2017 These are rotation angles, make sure the rotation order is "ZYX" and not "ZXY" because the second one is the default for objects, but the one that the converters use is the first one "ZYX". Link to comment
UncleCreepy Posted May 18, 2017 Author Share Posted May 18, 2017 36 minutes ago, Simple01 said: These are rotation angles, make sure the rotation order is "ZYX" and not "ZXY" because the second one is the default for objects, but the one that the converters use is the first one "ZYX". I just tried it again with 2 different converters and just can't get it right. Could you please try it with this object below and give me the RotX, RotY, RotZ, RotW coordinates so I can see if I'm doing something wrong? Link to comment
Simple0x47 Posted May 18, 2017 Share Posted May 18, 2017 Try this: (WXYZ) ( 0.5213, -0.47775, 0.70385, -0.06779 ) Link to comment
UncleCreepy Posted May 18, 2017 Author Share Posted May 18, 2017 Still not good, first picture is how it's supposed to be and the second one is how it is with those numbers. (Ignore that there's no other objects in second pic) Spoiler Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now