diff --git a/src/adaptors/rotmat.rs b/src/adaptors/rotmat.rs index 6d678639..1bef1a86 100644 --- a/src/adaptors/rotmat.rs +++ b/src/adaptors/rotmat.rs @@ -78,8 +78,8 @@ impl Rotmat> { pub fn look_at(&mut self, at: &Vec3, up: &Vec3) { - let zaxis = at.normalized(); - let xaxis = up.cross(&zaxis).normalized(); + let xaxis = at.normalized(); + let zaxis = up.cross(&xaxis).normalized(); let yaxis = zaxis.cross(&xaxis); self.submat = Mat3::new(xaxis.x.clone(), yaxis.x.clone(), zaxis.x.clone(),