Skip to content

Commit

Permalink
Fix inverted UP/DOWN for Vector3 and Vector3i
Browse files Browse the repository at this point in the history
Close #104
  • Loading branch information
Bromeon committed Feb 1, 2023
1 parent c22d860 commit 7d4582d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions godot-core/src/builtin/vector3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ impl Vector3 {
pub const RIGHT: Self = Self::new(1.0, 0.0, 0.0);

/// Unit vector in -Y direction. Typically interpreted as down in a 3D world.
pub const UP: Self = Self::new(0.0, -1.0, 0.0);
pub const UP: Self = Self::new(0.0, 1.0, 0.0);

/// Unit vector in +Y direction. Typically interpreted as up in a 3D world.
pub const DOWN: Self = Self::new(0.0, 1.0, 0.0);
pub const DOWN: Self = Self::new(0.0, -1.0, 0.0);

/// Unit vector in -Z direction. Can be interpreted as "into the screen" in an untransformed 3D world.
pub const FORWARD: Self = Self::new(0.0, 0.0, -1.0);
Expand Down
4 changes: 2 additions & 2 deletions godot-core/src/builtin/vector3i.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ impl Vector3i {
pub const RIGHT: Self = Self::new(1, 0, 0);

/// Unit vector in -Y direction.
pub const UP: Self = Self::new(0, -1, 0);
pub const UP: Self = Self::new(0, 1, 0);

/// Unit vector in +Y direction.
pub const DOWN: Self = Self::new(0, 1, 0);
pub const DOWN: Self = Self::new(0, -1, 0);

/// Unit vector in -Z direction.
pub const FORWARD: Self = Self::new(0, 0, -1);
Expand Down

0 comments on commit 7d4582d

Please sign in to comment.