最近、小学校のプログラミングの授業でも取り入れられている「ライントレースカー」。最初に、スクラッチで自動走行の仕組みを学んでおくと、実際にライントレースカーを作る際、より理解が深まります。
初めにライントレースの大会の動画を見てもらいます。1位の機体のスピードが、スゴイ!子そも達は「おぉ~はやいっっ」と目が釘付け。
テンションの上がったところでスクラッチに入ります。背景に道を描いてもらいます。子ども達は、複雑な道をつくろうとしますが、カーブが急であるほど、道から外れてしまいます。そこで、「スピード」「まがる角度」「スプライトの大きさ」の3要素、いろいろと値を変えて調整して、ゴールを目指します。
この「調整」することが、今回の学習のポイントです。確認作業の積み重ねに取り組んでもらえれば大成功。無事ゴールできたら時の「先生~できたっ!」、とっても嬉しそうでした。
参考動画(YouTube動画)~ライントレースとは?
![](https://n-lesson.net/wp-content/uploads/2023/11/1.png)
完成作品(基本)
基本の作品→https://scratch.mit.edu/projects/918445940
完成作品(応用)
基本の作品→https://scratch.mit.edu/projects/918456308
リミックス用(背景&ねずみあり、プログラムなし)
リミックス用→https://scratch.mit.edu/projects/918471502
基本の作品をつくろう
![](https://n-lesson.net/wp-content/uploads/2023/11/25.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/3.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/4.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/5.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/26.png)
【動画で確認】
![](https://n-lesson.net/wp-content/uploads/2023/11/27.png)
作品をアレンジしよう!
![](https://n-lesson.net/wp-content/uploads/2023/11/8.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/9.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/10.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/11.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/12.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/13.png)
![](https://n-lesson.net/wp-content/uploads/2023/11/14-1.png)