Project 563: Spinning Blocks

7. Make a Block Rotate in a Different Direction

In a new block, change the code so that the block rotates in a different direction from your original, which rotates on the Y axis.
Starting point file for this challenge

Your goal

Steps

1. Duplicate a SpinningBlock

Duplicate an existing SpinningBlock by right clicking on it and selecting 'Duplicate'. 

2. Copy the orientation of the new block

Copy the Y orientation of your new block is, so you can use it in your code later.

3. Open the script of your new block

Find your new SpinningBlock in the Explorer, then click the arrow next to it to show the files inside. Double click on 'SpinScript' to open it.

4. Replace the rotate variable with the Y orientation

Inside the Vector3, replace the 'rotation' variable with the Y orientation you copied in step 2.

5. Put the rotation variable back in

Now, replace the zero in either the X or Z positions in the Vector3 with the rotation variable.

6. Make sure the rotation variable starts at 0

Depending on which block you duplicated, your rotation variable may be set to a different number at the beginning of your code. You will probably want to make it 0 to avoid confusion later.

7. Save and Test

Save your project and hit the play button to test it out! Does it spin in the direction you wanted?