Skip to content

Commit

Permalink
- fixup normals / tangent space on meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
polymonster committed Apr 13, 2023
1 parent 28c44dd commit 28ad912
Show file tree
Hide file tree
Showing 8 changed files with 3,403 additions and 268 deletions.
12 changes: 9 additions & 3 deletions plugins/ecs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ fn update_camera_fly(

let mut cam_move_delta = Vec3f::zero();

let speed = 240.0 * (1.0 / time.time_scale);
let speed = 240.0;
let boost_speed = 2.0;
let control_speed = 0.25;

if enable_keyboard {
// get keyboard position movement
Expand All @@ -184,13 +185,18 @@ fn update_camera_fly(
cam_move_delta.z += speed;
}

// speed boost
// modifiers
if app.is_sys_key_down(os::SysKey::Shift) {
// speed boost
cam_move_delta *= boost_speed;
}
else if app.is_sys_key_down(os::SysKey::Ctrl) {
// fine control
cam_move_delta *= control_speed;
}

// scale by delta time, consistencies, but we ignore time scaling
cam_move_delta *= time.smooth_delta;
cam_move_delta *= time.raw_delta;
}

// get mouse rotation
Expand Down
Loading

0 comments on commit 28ad912

Please sign in to comment.