refactor projections into their own module
This commit is contained in:
parent
4e59d730fc
commit
a7e92ba70a
6 changed files with 124 additions and 174 deletions
|
@ -1,4 +1,6 @@
|
|||
use bevy::{prelude::*, window::PresentMode, render::camera::CameraProjectionPlugin};
|
||||
|
||||
use crate::screeninfo::ScreenInfo;
|
||||
// use offaxis::{offaxis_camera_setup, OffAxisProjection};
|
||||
|
||||
|
||||
|
@ -36,10 +38,17 @@ pub fn simulate_viewer(mut query: Query<&mut Viewer>)
|
|||
//v.position += Vec3::Y * 0.005;
|
||||
v.alpha += 0.01;
|
||||
let radius = 1.5;
|
||||
v.position = Vec3::new(v.alpha.sin()*radius,v.alpha.cos()*radius + 1.0_f32,15.0);
|
||||
|
||||
let z_distance = 8.0_f32;
|
||||
|
||||
v.position = Vec3::new(v.alpha.sin()*radius,v.alpha.cos()*radius + 1.0_f32,z_distance);
|
||||
|
||||
let vm = Mat4::look_at_rh(v.position, Vec3::ZERO, Vec3::Y);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
println!("{:?}",vm);
|
||||
|
||||
// view matrices should be orientation only
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue