Jump to content

Converting MTA Rotation to .ipl


Recommended Posts

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 by UncleCreepy
Switched "code" fields to "quote"
Link to comment

Please read my post completely. I found the converter and input the XYZ coordinates from MTA, and get this:

ycMCp9K.png

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 by UncleCreepy
Link to comment
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?

ZE8NDgS.png

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...