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
|
@ -21,7 +21,7 @@ impl CameraProjection for OffAxisProjection {
|
|||
|
||||
println!("Here we go! {:?}",self);
|
||||
|
||||
Mat4::perspective_rh_gl(45.0_f32.to_radians(),
|
||||
Mat4::perspective_rh(45.0_f32.to_radians(),
|
||||
self.aspect,
|
||||
self.near,
|
||||
self.far)
|
||||
|
@ -49,7 +49,6 @@ impl Default for OffAxisProjection {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
pub fn make_projection_rh_from_frustum(left: f32, right: f32, bottom: f32, top: f32, near:f32, far:f32) -> Mat4
|
||||
{
|
||||
// based on OpenSceneGraph / glFrustum implementation
|
||||
|
@ -70,6 +69,8 @@ pub fn offaxis_camera_setup(mut commands: Commands) {
|
|||
|
||||
let projection = OffAxisProjection::default();
|
||||
|
||||
// let projection = PerspectiveProjection::default();
|
||||
|
||||
// position the camera like bevy would do by default for 2D:
|
||||
let transform = Transform::from_xyz(0.0, 0.0, projection.far - 0.1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue