From da2ba8a43cf3dcfcc12a0cd604e2ceddcf11746f Mon Sep 17 00:00:00 2001 From: Emily Selwood Date: Tue, 16 Apr 2024 13:01:48 +0100 Subject: [PATCH] Add comment to example about coordinate system (#12991) # Objective When learning about creating meshes in bevy using this example I couldn't tell which coordinate system bevy uses, which caused confusion and having to look it up else where. ## Solution Add a comment that says what coordinate system bevy uses. --- examples/3d/generate_custom_mesh.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/3d/generate_custom_mesh.rs b/examples/3d/generate_custom_mesh.rs index 10e760c344..f9fbbe736c 100644 --- a/examples/3d/generate_custom_mesh.rs +++ b/examples/3d/generate_custom_mesh.rs @@ -122,7 +122,7 @@ fn create_cube_mesh() -> Mesh { Mesh::new(PrimitiveTopology::TriangleList, RenderAssetUsages::MAIN_WORLD | RenderAssetUsages::RENDER_WORLD) .with_inserted_attribute( Mesh::ATTRIBUTE_POSITION, - // Each array is an [x, y, z] coordinate in local space. + // Each array is an [x, y, z] coordinate in local space. Bevy uses a right-handed Y-up coordinate system. // Meshes always rotate around their local [0, 0, 0] when a rotation is applied to their Transform. // By centering our mesh around the origin, rotating the mesh preserves its center of mass. vec![