Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLTF models are rotated since 1.47 - how to fix CZML? #6808

Closed
sebastienaubry opened this issue Jul 17, 2018 · 3 comments
Closed

GLTF models are rotated since 1.47 - how to fix CZML? #6808

sebastienaubry opened this issue Jul 17, 2018 · 3 comments

Comments

@sebastienaubry
Copy link

sebastienaubry commented Jul 17, 2018

Hi,

Since release 1.47, the following change has made my aircraft move sideways:

glTF 2.0 models corrected to face +Z forwards per specification. Internally Cesium uses +X as forward, so a new +Z to +X rotation was added for 2.0 models only. To fix models that are oriented incorrectly after this change:

[Fix the glTF model]
Apply a -90 degree rotation to the model's heading. This can be done by setting the model's orientation using the Entity API or from within CZML. See #6738 for more details.

I am using a CZML file and the aircraft models from https://github.com/Ysurac/FlightAirMap-3dmodels.

In #6738 I could not find the way to fix my CZML files.

Thanks

@hpinkos
Copy link
Contributor

hpinkos commented Jul 17, 2018

Hi @sebastienaubry, see this comment: #6738 (comment)
You can set the orientation property for your model. It would look something like this:

    "position" : {
        "cartographicDegrees" : [longitude, latitude, height]
    },
    "orientation" : {
        "unitQuaternion": [ x, y, z, w ] // compute values using method in #6738
    },
    "model": {
        "gltf" : "..."
    }

If you have any follow up questions, please ask them on our forum: https://groups.google.com/forum/?hl=en#!forum/cesium-dev
We use GitHub exclusively for tracking bugs and planning new features. Thanks!

@hpinkos hpinkos closed this as completed Jul 17, 2018
@mramato
Copy link
Contributor

mramato commented Jul 17, 2018

A better solution would be to fix the model itself, but if you can't update the model then @hpinkos' suggestion would be the best way to go.

@sebastienaubry
Copy link
Author

Here is the follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants