From 835494059716d02cb524c71fe7202789275596d6 Mon Sep 17 00:00:00 2001 From: namark <namark@disroot.org> Date: Mon, 27 Jul 2020 04:57:32 +0400 Subject: [PATCH] Circular maze control adjustments. --- circular_maze.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/circular_maze.cpp b/circular_maze.cpp index a08b886..75bb88e 100644 --- a/circular_maze.cpp +++ b/circular_maze.cpp @@ -492,7 +492,10 @@ void start(Program& program) maze.current_angle = wrap(unwrapped_angle, 1.f); if(!result.success) + { radial_movements.pop(); + circular_velocity = 0; + } } else { @@ -528,8 +531,8 @@ void start(Program& program) if(drag) { - circular_velocity = drag->x(); - maze.circular_move(drag->x()/5); + circular_velocity += drag->x(); + maze.circular_move(drag->x()/3); if(jerk && (*jerk * float2::j() != float2::zero())) { @@ -541,9 +544,9 @@ void start(Program& program) } else { - circular_velocity *= 0.8f; - maze.circular_move(circular_velocity); + maze.circular_move(circular_velocity/3); } + circular_velocity *= 0.8f; } }; -- GitLab