diff --git a/src/Mono.cs b/src/Mono.cs index 0b1c517..62ecafc 100644 --- a/src/Mono.cs +++ b/src/Mono.cs @@ -63,8 +63,9 @@ static class Mono box_pose.position = Rig.head.position + Rig.head.orientation * V.XYZ(0, -(SD_Y + 0.5f) * box_scale, -32 * U.cm); } - // filter out neck breaking from snake_dir value set - if (snake[0] + Rig.new_dir != snake[1]) + XYZi next_pos = snake[0] + Rig.new_dir; + bool neck_break = next_pos == snake[1]; + if (!neck_break) { snake_dir = Rig.new_dir; }