Skip to content

Add glTF coordinate conversion for nodes #22354

@greeble-dev

Description

@greeble-dev

What problem does this solve or what need does it fill?

#20394 changed how glTF coordinate conversion worked to avoid bugs and support more use cases. However, it did so by removing support for node conversion - it only supports converting the scene and meshes. This was a pragmatic choice to keep the changes simple, but the long-term goal should be to support node conversion if possible.

 pub struct GltfConvertCoordinates {
     pub rotate_scene_entity: bool,
+    pub rotate_nodes: bool,
     pub rotate_meshes: bool,
 }

The main case for node conversion is when glTF is used as a scene format for gameplay entities. So the user isn't just importing a mesh to be rendered - they expect the nodes within the glTF scene to have meaning and an appropriate Transform::forward. Node conversion will allow them to follow their DCC's standard forward and (assuming the glTF is exported correctly) have the glTF loader convert them to Bevy forward.

What solution would you like?

Add node conversion as an option alongside scene and mesh conversion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-glTFRelated to the glTF 3D scene/model formatC-FeatureA new feature, making something new possibleP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Waiting-on-AuthorThe author needs to make changes or address concerns before this can be merged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions