aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2024-11-01 13:09:31 +0000
committerGitHub <noreply@github.com>2024-11-01 13:09:31 +0000
commitc3971fe5fa1c2e32c3dc17aed057cd5819de1fb8 (patch)
tree576900b27c7803e62f92f0e86c1a71958fd207a2
parent73193e99f7e10668e54ce98cf06c8db7a4aa1090 (diff)
parent30cf3ed02f791f72437aeac424f8b493a42afda7 (diff)
Merge pull request #4441 from Barinzaya/raymath-vectortransform-translation-fix
Fix raymath not applying matrix translations
-rw-r--r--vendor/raylib/raymath.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/vendor/raylib/raymath.odin b/vendor/raylib/raymath.odin
index eef5c2fcd..c66498e41 100644
--- a/vendor/raylib/raymath.odin
+++ b/vendor/raylib/raymath.odin
@@ -153,7 +153,7 @@ Vector2Normalize :: proc "c" (v: Vector2) -> Vector2 {
// Transforms a Vector2 by a given Matrix
@(require_results)
Vector2Transform :: proc "c" (v: Vector2, m: Matrix) -> Vector2 {
- v4 := Vector4{v.x, v.y, 0, 0}
+ v4 := Vector4{v.x, v.y, 0, 1}
return (m * v4).xy
}
// Calculate linear interpolation between two vectors
@@ -399,7 +399,7 @@ Vector3RotateByAxisAngle :: proc "c" (v: Vector3, axis: Vector3, angle: f32) ->
// Transforms a Vector3 by a given Matrix
@(require_results)
Vector3Transform :: proc "c" (v: Vector3, m: Matrix) -> Vector3 {
- v4 := Vector4{v.x, v.y, v.z, 0}
+ v4 := Vector4{v.x, v.y, v.z, 1}
return (m * v4).xyz
}
// Calculate linear interpolation between two vectors