From 1ccd4fb6fae4ee7d767c1be56d51f0b643dfac7d Mon Sep 17 00:00:00 2001 From: Thompson Lee Date: Fri, 5 Aug 2016 01:04:29 -0400 Subject: [PATCH] Reverting Mtx_Lookat() changes. --- source/maths/mtx_lookat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/maths/mtx_lookat.c b/source/maths/mtx_lookat.c index 318fd6c..112f8a8 100644 --- a/source/maths/mtx_lookat.c +++ b/source/maths/mtx_lookat.c @@ -8,7 +8,7 @@ void Mtx_LookAt(C3D_Mtx* out, C3D_FVec cameraPosition, C3D_FVec cameraTarget, C3 C3D_FVec xaxis, yaxis, zaxis; //Order of operations is crucial. - zaxis = FVec3_Normalize(FVec3_Subtract(cameraPosition, cameraTarget)); + zaxis = FVec3_Normalize(FVec3_New(cameraPosition.x - cameraTarget.x, cameraPosition.y - cameraTarget.y, cameraPosition.z - cameraTarget.z)); xaxis = FVec3_Normalize(FVec3_Cross(cameraUpVector, zaxis)); yaxis = FVec3_Cross(zaxis, xaxis);