1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. I will no longer be hosting XLNation as of March 1, 2017. Skullz613 will be taking the reigns of the site in early 2017 and XLNation will be moving to a new web hosting service. During that transition there will be an interruption in service of up to two weeks. Skullz613 is now a full administrator of XLNation. Be kind to him.

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/

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