-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Clarify inconsistent GltfConvertCoordinates 0.18 behavior #22209
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -151,6 +151,20 @@ pub struct GltfLoader { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pub default_sampler: Arc<Mutex<ImageSamplerDescriptor>>, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// The default glTF coordinate conversion setting. This can be overridden | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// per-load by [`GltfLoaderSettings::convert_coordinates`]. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Setting any of these values to true will result in the relevant entities | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// moving in opposite directions when using the forward direction. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// This means that within a scene, different entities in a hierarchy will | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// move in different global directions when using the forward direction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// for that `Entity`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// For example, a parent `Entity` A, with a child `Entity` B that has a `Mesh3d` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// component: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - Entity A with a `Transform` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - Entity B with a `Transform`, `Mesh3d`, `MeshMaterial3d` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// If A's forward moves "North", B's forward moves "South" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pub default_convert_coordinates: GltfConvertCoordinates, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// glTF extension data processors. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// These are Bevy-side processors designed to access glTF | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -204,6 +218,20 @@ pub struct GltfLoaderSettings { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Overrides the default glTF coordinate conversion setting. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// If `None`, uses the global default set by [`GltfPlugin::convert_coordinates`](crate::GltfPlugin::convert_coordinates). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// Setting any of these values to true will result in the relevant entities | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// moving in opposite directions when using the forward direction. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// This means that within a scene, different entities in a hierarchy will | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// move in different global directions when using the forward direction | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// for that `Entity`. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// For example, a parent `Entity` A, with a child `Entity` B that has a `Mesh3d` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// component: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - Entity A with a `Transform` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// - Entity B with a `Transform`, `Mesh3d`, `MeshMaterial3d` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /// If A's forward moves "North", B's forward moves "South" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+221
to
+234
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SceneRoot's placement here is incorrect. The tree doesn't even have to include it if spawned from a scene_spawner, and writing it like this makes it confusing as to whether it's referring to the |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pub convert_coordinates: Option<GltfConvertCoordinates>, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.