Skip to content

Commit 5c3d6e1

Browse files
msvbgjames7132
authored andcommitted
Fix documentation for looking_at/look_at (bevyengine#4696)
Bevy's coordinate system is right-handed Y up, so +Z points towards my nose and I'm looking in the -Z direction. Therefore, `Transform::looking_at/look_at` must be pointing towards -Z. Or am I wrong here?
1 parent fba90f5 commit 5c3d6e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/bevy_transform/src/components/transform.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ impl Transform {
116116
}
117117
}
118118

119-
/// Updates and returns this [`Transform`] by rotating it so that its unit vector in the
120-
/// local `Z` direction is toward `target` and its unit vector in the local `Y` direction
121-
/// is toward `up`.
119+
/// Updates and returns this [`Transform`] by rotating it so that its unit
120+
/// vector in the local negative `Z` direction is toward `target` and its
121+
/// unit vector in the local `Y` direction is toward `up`.
122122
#[inline]
123123
#[must_use]
124124
pub fn looking_at(mut self, target: Vec3, up: Vec3) -> Self {

0 commit comments

Comments
 (0)