diff options
author | HampusM <hampus@hampusmat.com> | 2024-08-20 20:34:05 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-08-20 20:34:05 +0200 |
commit | c8c7012b4bbf72b082e50c76de2550e85c8ebfd0 (patch) | |
tree | dc09cb3fd77a6f3db7051e07a087b1dad6c82649 /src | |
parent | cb05930d35134b269314e514f9a69ec3e40f279e (diff) |
fix: use fly camera properly again
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index d47bcb2..8710a21 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,11 @@ use std::error::Error; use std::fs::read_to_string; use std::path::Path; -use engine::camera::fly::{Extension as FlyCameraExtension, Options as FlyCameraOptions}; +use engine::camera::fly::{ + Extension as FlyCameraExtension, + Fly as FlyCamera, + Options as FlyCameraOptions, +}; use engine::camera::{Active as ActiveCamera, Camera}; use engine::color::Color; use engine::data_types::dimens::Dimens; @@ -95,6 +99,7 @@ fn main() -> Result<(), Box<dyn Error>> position: Vec3 { x: 0.0, y: 0.0, z: 3.0 }, }, ActiveCamera, + FlyCamera::default(), )); engine.add_sole(GlobalLight::default())?; @@ -113,7 +118,6 @@ fn main() -> Result<(), Box<dyn Error>> ); engine.add_extension(FlyCameraExtension(FlyCameraOptions { - camera_speed: 3.0, mouse_sensitivity: 0.2, })); |