1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. It's not long before we will be moving. The new hosting has been setup and the next thing to be done is to change the DNS. When it's changed it may take between 24 to 48 hours to take effect. During this time XLN will be closed so it can be backed up. When the new DNS takes effect, you will see a basic page with a message regarding the move.

Tutorial Rotation Coordinates Explanation

Rotation coordinates explanation - Original Author: Monty

  1. Monty
    Original Author: Monty
    ---
    Placing furniture, trees and actors with precise coordinates in our custom lots it's quite easy, we just need to use the regular X,Y,Z coordinates. But when you want rotate an object probabably you, as myself, find out with a mysterious four coordinates with strange numbers that confuse you. Like this: <Rotation>1.07071e-007,6.18172e-008,0.258819,0.965926</Rotation>

    What the heck is that?
    Well, that has a name and it's called "Quaternation rotation coordinates".

    Why the game don't use just the X,Y,Z coordinates?
    Because it has some limitations and most 3D game engines use quaternations .Quaternation uses complex numbers and it's almost impossible for a non mathematical guy like me to know what they mean. So I will not explain what the heck they are, if you want to know more about them read this Wiki article: http://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation

    So what's the point of this guide? Do you have any solution?
    Yes, I'm as lazy as you for mathematics so I'm gonna tell you how to convert X,Y,Z rotation coordinates to the quarter...quacker...wathever, that CXL use.

    Does it really have to be that complicated?
    Not really, if you want to do the most basic and common rotation (Z axis rotation) just copy and paste these coordinates to get the same result on the object as you see in the picture.

    0 degrees
    <Rotation>0,0,0,1</Rotation>
    none.jpg

    45 d
    <Rotation>0,0,0.382,0.923</Rotation>
    45.jpg

    90 d
    <Rotation>0,0,0.707,0.707</Rotation>
    90.jpg

    180 d
    <Rotation>0,0,1,0</Rotation>
    180.jpg

    225 d
    <Rotation>0,0,0.923,-0.382</Rotation>
    255.jpg

    270 d
    <Rotation>0,0,0.707,-0.707</Rotation>
    270.jpg


    315 d
    <Rotation>0,0,0.382,-0.923</Rotation>
    315.jpg

    ----
    I want to make rotations in other axes or more complex and precise rotations. How can I get those values in quakers quaternions?
    Altiris found this tool which allows you to convert X,Y,Z rotation coordinates to quaternation rotation coordinates:

    http://www.steve-m.com/downloads/tools/rotcalc/
    kipate, Mr.X², Lokentaz and 2 others like this.

Recent Reviews

  1. Birk LeGlaire
    Birk LeGlaire
    5/5,
    Without this guide, no chance to anderstand!
    Very useful!
  2. Drazicdesign
    Drazicdesign
    5/5,
    I use your tutorial right now to modfifier files from the original game!
    Thank you,
  3. nicko2u
    nicko2u
    5/5,
    yep most useful over the years
  4. bobqwerty
    bobqwerty
    5/5,
    It sure come in handy while creating layout files. thanks