Skip to content

Commit 7d4582d

Browse files
committed
Fix inverted UP/DOWN for Vector3 and Vector3i
Close #104
1 parent c22d860 commit 7d4582d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

godot-core/src/builtin/vector3.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ impl Vector3 {
4646
pub const RIGHT: Self = Self::new(1.0, 0.0, 0.0);
4747

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

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

5454
/// Unit vector in -Z direction. Can be interpreted as "into the screen" in an untransformed 3D world.
5555
pub const FORWARD: Self = Self::new(0.0, 0.0, -1.0);

godot-core/src/builtin/vector3i.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ impl Vector3i {
4545
pub const RIGHT: Self = Self::new(1, 0, 0);
4646

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

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

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

0 commit comments

Comments
 (0)