Search code examples
gltf

what unit of angle in the file glTF?


I'm trying to understand the format of glTF, tell me please what unit of angle in the file?

"nodes":[
{"name":"Bone2","rotation":[-0.6466940641403198,0,1.4359492797940017e-16,0.7627494931221008]},

Solution

  • Quaternion, looks like.

    specification/2.0/schema/node.schema.json:

    "rotation": {
        "type": "array",
        "description": "The node's unit quaternion rotation in the order (x, y, z, w), where w is the scalar.",
        "items": {
            "type": "number",
            "minimum": -1.0,
            "maximum": 1.0
        },
        "minItems": 4,
        "maxItems": 4,
        "default": [ 0.0, 0.0, 0.0, 1.0 ]
    },