Skip to content

Commit 000e6e2

Browse files
committed
Fix documentation for looking_at/look_at (#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 ccf7c65 commit 000e6e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

crates/bevy_transform/src/components/transform.rs

+3-3
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)