continue traversing nodes if brick not hit

This commit is contained in:
Piotrek
2021-04-23 16:06:54 +02:00
parent af5c2f2532
commit b59523c13b
7 changed files with 20 additions and 15 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
use cgmath::{Point3, Vector3, Matrix4, Deg};
use cgmath::{Point3, Vector3, Matrix4, Deg, InnerSpace};
pub struct Camera {
pub position: Point3<f32>,
@@ -14,8 +14,8 @@ impl Camera {
pub fn new(aspect: f32, fov: f32) -> Self {
Self {
position: (0.0, 1.0, 0.0).into(),
forward: (0.0, 0.0, 1.0).into(),
position: (2.0, 1.0, -1.0).into(),
forward: (-0.66, -0.33, 0.66).into(),
up: Vector3::unit_y(),
aspect,
fovy: fov,