Skip to content

Commit

Permalink
Fix documentation for looking_at/look_at (#4696)
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
msvbg committed Oct 12, 2022
1 parent ccf7c65 commit 000e6e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_transform/src/components/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ impl Transform {
}
}

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

0 comments on commit 000e6e2

Please sign in to comment.