
Cube and Steps
Description
* This is a "Pen" project. This means the cubes are all drawn using Pen. There are no cube costumes. The cube rolls down the steps. This project uses code that rotates points around the X axis (or Z axis when the cube rolls along the steps). Before rotating the cube, we shift the edge of it has to rotate around to the X or Z axis. We rotate the cube then shift it back so that the edge being rotated around is back in its original position. Rather than letting the cube roll off the stage, we make it roll in the centre while the board moves. After a 180 degree roll, the cube would have shifted a distance equal to the length of one side in two directions. So we move the board the length of one side against each of these directions while the cube rolls 180 degrees. Finally, if the X axis was straight across the screen, the Y axis straight up the screen and the Z axis straight out from the screen then we would only see one face of the cube. The rotation was done with the cubes aligned with the X,Y and Z axes to keep the math "simple", but we then rotate the cube and board before drawing them so that we can see the 3D clearly. 3D Tutorial Studio: https://scratch.mit.edu/studios/5040029/ Polyhedron Studio: https://scratch.mit.edu/studios/5085215/ Pink Panther Theme Tune by Henry Mancini. Huge thanks to @TheLogFather for his Fast Triangle Fill custom block. Animation Tutorial Pen GIF
Instructions
Just watch or press a key to determine the direction for the cube to roll next. Arrow keys - <left>, <right>, <down>, <up> Key <c> - square combo
Project Details
- Visibility
- Visible
- Comments
- Enabled
More Cool Projects

Bouncy Dodge
by CityStar38

Minecraft - sort of. (100% pen, except for the thumbnail - so like, 99.9% pen)
by JackGreenAerth

Y-box v3 - Insomnia
by Youxe

Sprunki Oc Real V3 Part 2/3
by TheNightz_

Syn OS X 10.5.1 Leopard
by KkRocks46

Tornado Survival Simulator | v1.1
by s20038627

Star Wars Battle Version 5.5 Hardcore
by Newlymade

Talking
by Alfie_Ben16

Green Empire.EXE Button 57!!!!!!!
by IpadUser555

Issued 1.10 update 4 RALR Interactive. remix remix
by orcalane10

TNTジャンプを極めし者のTNT発射装置【GIF】【マイクラ実況】
by motonisi777

Beat Up Mr Scratch Cat (BETA 1.0)
by NotACoder2022

Beat Up Scratch Cat 6 (Discontinued for work on BUSC 7) remix
by Dylan71312

Opening to Bluey's World 2019 DVD
by seba202884

大乱闘スマッシュブラザーズ
by SUPERMARIO-10

I Figured Out How The Animated Text Works!
by Lightning1218

Adventures in Bayclan
by Wildflight

Vyond Effects Kit 2015-2017 (EXTENDED ^2)
by lateone1

Minecraft V6
by Finlay_Cool

ねこの回転寿司 / Cat's Conveyor belt sushi
by pandakun

Beat up Pinkfong v2.12
by 1561042

Undertale Undyne the Undying Fight
by NightOfTheSun

My amazing scratch
by TKX_fTK

Beat Up Coiny remix
by Alfie_Ben16