mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-10 01:28:41 -06:00
fix panic
This commit is contained in:
parent
8ff2a828ad
commit
3593fcd4d5
|
@ -11,7 +11,7 @@ fn update_view_matrix(
|
|||
) {
|
||||
for (camera, transform) in (&mut vm_camera, v_transform.inserted_or_modified()).iter() {
|
||||
let (_, rotation, translation) = transform.0.to_scale_rotation_translation();
|
||||
let direction = rotation * Vec3::NEG_Z;
|
||||
let direction = (rotation * Vec3::NEG_Z).normalize();
|
||||
camera.view_matrix = Mat4::look_to_rh(translation, direction, camera.up);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue