default texture, y is up
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -66,7 +66,7 @@ impl TestGame {
|
||||
self.cubes = self.test_meshes.iter().map(|(mesh, tex_id)| renderer.add_game_object(GameObject::new(*mesh, *tex_id, renderer))).collect();
|
||||
}
|
||||
|
||||
self.cam_rotation = self.cam_rotation * Quaternion::from_angle_z(Deg(self.input.get_axis("look_horizontal") * 0.05));
|
||||
self.cam_rotation = self.cam_rotation * Quaternion::from_angle_y(Deg(self.input.get_axis("look_horizontal") * 0.05));
|
||||
self.cam_rotation = Quaternion::from_angle_x(Deg(self.input.get_axis("look_vertical") * 0.05)) * self.cam_rotation;
|
||||
self.cam_position += self.cam_rotation.invert().rotate_vector(Vector3::new(
|
||||
self.input.get_axis("move_sideways") * -0.05,
|
||||
@@ -110,10 +110,10 @@ fn main() {
|
||||
let mut renderer = VulkanRenderer::init(
|
||||
(-line_count..=line_count)
|
||||
.flat_map(|it| vec![
|
||||
LinePoint { position: [it as f32, -line_count as f32, 0.] },
|
||||
LinePoint { position: [it as f32, line_count as f32, 0.] },
|
||||
LinePoint { position: [-line_count as f32, it as f32, 0.] },
|
||||
LinePoint { position: [line_count as f32, it as f32, 0.] },
|
||||
LinePoint { position: [it as f32, 0., -line_count as f32] },
|
||||
LinePoint { position: [it as f32, 0., line_count as f32] },
|
||||
LinePoint { position: [-line_count as f32, 0., it as f32] },
|
||||
LinePoint { position: [line_count as f32, 0., it as f32] },
|
||||
]).collect(),
|
||||
log_config.vulkan_validation_layers,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user