Skip to content

Commit 158defd

Browse files
atlv24superdump
andauthored
Document Camera coordinate space (#13012)
# Objective Missing docs ## Solution Add docs paraphrased from the Cart's mouth: https://discord.com/channels/691052431525675048/691052431974465548/1172305792154738759 > It follows the natural "results" of right handed y-up. The default camera will face "forward" in -Z, with +X being "right". The RH y-up setup is reasonably common. Thats why I asked for existing examples.I think we should appeal to the masses here / see how other RH Y-up 3D packages / engines handle this --------- Co-authored-by: Robert Swain <robert.swain@gmail.com>
1 parent 3fea726 commit 158defd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/bevy_core_pipeline/src/core_3d/camera_3d.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ use bevy_transform::prelude::{GlobalTransform, Transform};
1515
use serde::{Deserialize, Serialize};
1616

1717
/// Configuration for the "main 3d render graph".
18+
/// The camera coordinate space is right-handed x-right, y-up, z-back.
19+
/// This means "forward" is -Z.
1820
#[derive(Component, Reflect, Clone, ExtractComponent)]
1921
#[extract_component_filter(With<Camera>)]
2022
#[reflect(Component)]
@@ -133,6 +135,8 @@ pub enum ScreenSpaceTransmissionQuality {
133135
Ultra,
134136
}
135137

138+
/// The camera coordinate space is right-handed x-right, y-up, z-back.
139+
/// This means "forward" is -Z.
136140
#[derive(Bundle, Clone)]
137141
pub struct Camera3dBundle {
138142
pub camera: Camera,

0 commit comments

Comments
 (0)