Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions crates/bevy_gltf/src/loader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Comment on lines +154 to +165
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
///
/// 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`
///
/// ## Disclaimer
///
/// 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:
///
/// - `SceneRoot`
/// - 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
Expand Down Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
///
/// 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"
///
/// ## Disclaimer
///
/// 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:
///
/// - `SceneRoot`
/// - Entity A with a `Transform`
/// - Entity B with a `Transform`, `Mesh3d`, `MeshMaterial3d`
///
/// If A's forward moves "North", B's forward moves "South"

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 SceneRoot or the scene's root, which are different entities.

pub convert_coordinates: Option<GltfConvertCoordinates>,
}

Expand Down