pull/157/head
Hiroaki Yutani 3 years ago
parent ecf8076b75
commit 1bb374c89e

@ -22,7 +22,7 @@ struct Camera {
impl Camera {
fn build_view_projection_matrix(&self) -> cgmath::Matrix4<f32> {
// 1.
let view = cgmath::Matrix4::look_at(self.eye, self.target, self.up);
let view = cgmath::Matrix4::look_at_rh(self.eye, self.target, self.up);
// 2.
let proj = cgmath::perspective(cgmath::Deg(self.fovy), self.aspect, self.znear, self.zfar);

@ -50,7 +50,7 @@ impl Camera {
}
pub fn calc_matrix(&self) -> Matrix4<f32> {
Matrix4::look_at_dir(
Matrix4::look_to_rh(
self.position,
Vector3::new(
self.yaw.0.cos(),

Loading…
Cancel
Save