search for problem with custom projection matrices
This commit is contained in:
parent
c3b852f312
commit
249187b698
4 changed files with 21 additions and 10 deletions
|
@ -35,7 +35,17 @@ pub fn simulate_viewer(mut query: Query<&mut Viewer>)
|
|||
for mut v in query.iter_mut() {
|
||||
//v.position += Vec3::Y * 0.005;
|
||||
v.alpha += 0.01;
|
||||
let radius = 0.5;
|
||||
v.position = Vec3::new(v.alpha.sin()*radius,v.alpha.cos()*radius,5.0);
|
||||
let radius = 1.5;
|
||||
v.position = Vec3::new(v.alpha.sin()*radius,v.alpha.cos()*radius + 1.0_f32,15.0);
|
||||
|
||||
let vm = Mat4::look_at_rh(v.position, Vec3::ZERO, Vec3::Y);
|
||||
|
||||
println!("{:?}",vm);
|
||||
|
||||
// view matrices should be orientation only
|
||||
let dir = Quat::from_mat4(&vm);
|
||||
|
||||
v.orientation = dir;
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue