Calculating the rotation of Items

Hello everyone, i have a question about the “rot” function for containers with visible Items.

The official Modding Guide says you have to use the "rotation as quaternion (w,x,y,z). Ok great! But how i can calculate easily how to use this to make for example a rotation of 25º on the z-axes? Is there a calculator, except the Blender Plugin, to get the results?

1 Like

No clue but concider me very interested

Just typing quaternion calculator in google found many useful results.

I already tried one of this but i’m a little bit confused wich data i need to insert for the calculation…

Tried with this one 3D Rotation Converter

maybe this one works better. If i unterstand it right you have to insert the positioning of the object (x,y,z) in the first line and the rotation for the second one. so you get the correct number right? But for this one i didn’t found a way to choose on witch axis i want to make the rotation

EDIT
or maybe this one is much better https://quat.zachbennett.com/

Are you talking about the resulting json?
In json, position does not matter, only the hierarchy

         "ATTOVERCOG": {
            "pos": [-0.0,-4.5,40.833333],
            "rot": [1.0,0.0,-0.0,0.0],
            "sca": [1.0,1.0,1.0]
         },

Rot has 4 values, just copy the quaternion to it. Like x90º would be 0.7,0.7,0,0

i mean how can i select on witch axis the model should rotate?
if i want a rotation on the x-axis the values are like you said (0.7,0.7,0,0), so also if i want it on the z-axis it should be (0.7,0,0,0.7) right?

“Used the generator from this side —> Quaternion Calculator

You just insert the rotation you want in the calculator and it will spill the quaternion. If you want just on x, do 90,0,0 as input and get 0.7,0.7,0,0 as output. Insert 0,0,90 for the z axis and get something else, 90,0,90 for both x and z rotation will result in 0.5,0.5,0.5,0.5, and so on.
It does not have a clear pattern, for example, rotate 45 just on y axis will give you this:
0.92388, 0, 0.38268, 0

Yes i’ve seen. but it’s really helpful for placing items with the right rotation! Thx Bruno! I searched on google with the worng keywords!