bloboland

diff src/camera.cc @ 3:a39c301cdcce

terrain raytracing pretty much done
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 16 Dec 2012 14:24:16 +0200
parents cfe68befb7cc
children
line diff
     1.1 --- a/src/camera.cc	Sun Dec 16 00:37:35 2012 +0200
     1.2 +++ b/src/camera.cc	Sun Dec 16 14:24:16 2012 +0200
     1.3 @@ -148,8 +148,8 @@
     1.4  {
     1.5  	mat->reset_identity();
     1.6  	mat->translate(Vector3(pos.x, pos.y, pos.z));
     1.7 -	mat->rotate(Vector3(0, theta, 0));
     1.8 -	mat->rotate(Vector3(phi, 0, 0));
     1.9 +	mat->rotate(Vector3(0, -theta, 0));
    1.10 +	mat->rotate(Vector3(-phi, 0, 0));
    1.11  }
    1.12  
    1.13  void FpsCamera::calc_inv_matrix(Matrix4x4 *mat) const