From fcecf7860977270baab21c7fac837b7c7c091257 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Thu, 4 Jun 2020 23:01:02 -0700 Subject: [PATCH] make input_keyboard example speed a normal variable --- examples/input/input_keyboard.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/input/input_keyboard.rs b/examples/input/input_keyboard.rs index 28776d770d..fa6d578bbf 100644 --- a/examples/input/input_keyboard.rs +++ b/examples/input/input_keyboard.rs @@ -27,14 +27,14 @@ fn move_on_input( println!("left just released"); } - const SPEED: f32 = 3.0; + let speed = 3.0; for (mut translation, _) in query.iter_mut(world) { if moving_left { - translation.0 += math::vec3(SPEED, 0.0, 0.0) * time.delta_seconds; + translation.0 += math::vec3(speed, 0.0, 0.0) * time.delta_seconds; } if moving_right { - translation.0 += math::vec3(-SPEED, 0.0, 0.0) * time.delta_seconds; + translation.0 += math::vec3(-speed, 0.0, 0.0) * time.delta_seconds; } } }