From 8b6c9fad3f2b64a237352d7f4ddc557fd2e520dd Mon Sep 17 00:00:00 2001 From: Richard L Date: Sun, 6 Dec 2015 20:36:12 -0500 Subject: [PATCH] Another camera Shifting bug update Closes #201 Closes #251 See my explanation here: https://github.com/PistonDevelopers/hematite/pull/251#issuecomment-162385839 --- src/main.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index 4a3c5d6..05b4c2f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,7 +38,7 @@ use piston::event_loop::{ Events, EventLoop }; use flate2::read::GzDecoder; use sdl2_window::Sdl2Window; use shader::Renderer; -use vecmath::{ vec3_add, vec3_scale, vec3_normalized }; +use vecmath::{ vec3_add, vec3_scale}; use piston::window::{ Size, Window, AdvancedWindow, OpenGLWindow, WindowSettings }; @@ -210,14 +210,6 @@ fn main() { // Apply the same y/z camera offset vanilla minecraft has. let mut camera = first_person.camera(0.0); camera.position[1] += 1.62; - let mut xz_forward = camera.forward; - xz_forward[1] = 0.0; - xz_forward = vec3_normalized(xz_forward); - camera.position = vec3_add( - camera.position, - vec3_scale(xz_forward, 0.0) - ); - let view_mat = camera.orthogonal(); renderer.set_view(view_mat); renderer.clear();