diff --git a/circular_maze.cpp b/circular_maze.cpp index a08b886b4e9784c8bb2deac0e5cbe61da0db7512..75bb88ee1a3c194189f7b70671819280b503fe64 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; } };