From 112615a14e6f0af48f90d2156c3361af0866a750 Mon Sep 17 00:00:00 2001 From: "Craig S. Bosma" Date: Wed, 16 Feb 2011 16:10:39 -0600 Subject: [PATCH] Fix what appears to be a bug in the 'look at' implementation --- MC3DMatrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MC3DMatrix.c b/MC3DMatrix.c index fee60b3..296f4b8 100644 --- a/MC3DMatrix.c +++ b/MC3DMatrix.c @@ -271,7 +271,7 @@ void mat4SubMatrx(mat4 mr, mat3 *mb, int i, int j) { } #pragma mark - -#pragma mark Matrix Transpose +#pragma mark Matrix Projections and Views mat4 mat4CreateFrustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat near, GLfloat far) { mat4 ret; @@ -346,7 +346,7 @@ mat4 mat4LookAt(vec3 position, vec3 target, vec3 up) { position4.x = position.x; position4.y = position.y; position4.z = position.z; - position4.w = 0.f; + position4.w = 1.f; vec4 positionPrime = mat4MultiplyVec4(ret, position4); mat4Transpose(&ret); ret.w = positionPrime;