Printable version

This version is formatted for printing or saving as a PDF.

Disco dance floor

A character dances on a disco floor.
Level 1
15 mins

Goal 🎯

Create a disco dance floor that changes colour as your character dances.

Personalise your world

  • Choose sky colours.
  • Choose your map.
  • Choose a map material.
  • Choose a map colour.
Arrows point to the sky colour blocks, map terrain, material and map colour blocks.

Add the dance floor

  • Use the + sign under the canvas to add a box to the centre of the world.
  • Change width to 10.
  • Change height to 0.2.
  • Change depth to 10.
  • From Materials, drag the ‘glow’ block under the ‘add box’ block.
  • Press Play ▶️ to test. Your box floor will glow.
  • Debug: Did you press play? Check that the box and the glow block use the same name.
An arrow points to the box model then the centre of the map and then the key changes to the box block are highlighted.

Make the dance floor change colour

  • From Events, drag the forever block to the code area.
  • From Materials, drag the ‘set material’ block into the ‘forever’ block.
  • From Control, drag the ‘wait 1 seconds’ block under the ‘set material’ block.
  • Duplicate the ‘set material’ block and the ‘wait 1 seconds’ block by selecting it and pressing D on your keyboard or you can tap and hold to use the menu.
  • Choose colours for your disco floor.
  • Press Play ▶️ to test. Your disco dance floor will change colours every second.
  • Debug: Did you press play? Check that the box and the ‘set material’ block use the same name. Check that you chose different colours. Try different colour combinations as some work better than others.
There is a yellow and a blue dance floor. They change colours every second.

Add a dancing character

  • Use the + sign under the canvas to add a character to your dance floor.
  • From Animate, drag the ‘switch animation’ block under the ‘add character’ block.
  • Change the animation to one of the dances.
  • Press Play ▶️ to test. Your character will dance.
  • Debug: Did you press play? Check that the ‘add character’ block and the ‘switch animation’ block use the same name.
The character is now dancing on the dance floor.

Take it further

  • Add more characters dancing.
  • Make the floor smaller and add another floor with different colours.
  • Add the ‘switch animation’ block inside the forever loop to changes dances when the material changes.

Idea gallery

This project is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Flock XR® and the Flock XR purple bird are trademarks registered to Flip Computing Ltd.