diff --git a/crates/bevy_transform/src/components/global_transform.rs b/crates/bevy_transform/src/components/global_transform.rs index bc038a8b89fa2..18c956c4ee7da 100644 --- a/crates/bevy_transform/src/components/global_transform.rs +++ b/crates/bevy_transform/src/components/global_transform.rs @@ -26,7 +26,7 @@ use bevy_reflect::Reflect; /// update the [`Transform`] of an entity in this stage or after, you will notice a 1 frame lag /// before the [`GlobalTransform`] is updated. /// -/// Example: [transform](https://github.com/bevyengine/bevy/blob/latest/examples/transforms/transform.rs), +/// Example: [global_vs_local_translation.rs](https://github.com/bevyengine/bevy/blob/latest/examples/transforms/global_vs_local_translation.rs) #[derive(Component, Debug, PartialEq, Clone, Copy, Reflect)] #[reflect(Component, PartialEq)] pub struct GlobalTransform(Affine3A); diff --git a/crates/bevy_transform/src/components/transform.rs b/crates/bevy_transform/src/components/transform.rs index 19226110aa34b..0383e22d41aa2 100644 --- a/crates/bevy_transform/src/components/transform.rs +++ b/crates/bevy_transform/src/components/transform.rs @@ -32,8 +32,12 @@ use std::ops::Mul; #[reflect(Component, Default, PartialEq)] pub struct Transform { /// Position of the entity. In 2d, the last value of the `Vec3` is used for z-ordering. + /// + /// Example: [translations](https://github.com/bevyengine/bevy/blob/latest/examples/transforms/translation.rs) pub translation: Vec3, /// Rotation of the entity. + /// + /// Example: [3d_rotation](https://github.com/bevyengine/bevy/blob/latest/examples/transforms/3d_rotation.rs) pub rotation: Quat, /// Scale of the entity. /// @@ -53,7 +57,6 @@ impl Transform { /// is used for z-ordering elements: higher `z`-value will be in front of lower /// `z`-value. /// - /// Example: [translations](https://github.com/bevyengine/bevy/blob/latest/examples/transforms/translation.rs) #[inline] pub const fn from_xyz(x: f32, y: f32, z: f32) -> Self { Self::from_translation(Vec3::new(x, y, z))