Dance Like Drake!
Using Scratch 3 you can program Marty to perform a Toosie Slide!
You'll get a chance to use some of the more advanced movement blocks to make sure Marty's timing is perfect.
what you will need
- A Scratch 3 compatible device
- Marty the Robot
What will you learn about?
- How to move individual body joints
- How to make your own custom movements using some of the more advanced coding blocks
Performing the toosie slide
As usual we start with the 'when green flag clicked' block followed by the 'get ready' block to warm Marty up. Then let's get Marty to stand straight, ready to perform the moves. The blocks you need to do this are shown below:
Now we need to do a Toosie Slide:
Left foot up, right foot slide
Since Marty is facing us, we need to swap the sides round if we want his moves to exactly match Drakes.
Before Marty can lift his right foot, we need to make him lean left - or he'll fall over! We played around with timings and found that 0.5 seconds was the best to keep Marty in synch with the music, but feel free to experiment
Now Marty needs to raise his left foot and then lower it. Usually you might use the “lift left foot” and “lower legs” block for this, but because we need to control the timing we are instead going to program this using the “move --- to --- in --- s” block.
Feel free to experiment with different timings and values to control how high Marty raises his leg. We found the values shown in the code below worked best for our Marty - but maybe yours is more flexible!
Before Marty slides, he needs to stand straight or he’ll twist himself into knots. Use the “stand straight” block for this. Now we can use the handy “slide --- times to the --- in --- s, length ---” block to make Marty slide - it’s almost like he was designed for this move!
Now the second part of the Toosie Slide is exactly the same as the first but in the opposite direction.
Right foot up, left foot slide
So we can use the same code, but need to switch all the directions round (from left to right, or right to left). Also - be careful to make the knee movements in the “move --- to --- in ---s” negative, or you’ll have some very odd looking leg lifts!
The final code should look like this:
Congratulations! Your Marty should now be performing a Toosie Slide as well as Drake. If you’d like to challenge yourself have a look at the following ideas:
- Program Marty to move his arms while performing the Toosie Slide
- Have a go at recreating other dances using the movement blocks we have introduced here - be sure to let us see any of your results!