Printable version

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

Haunted hut

A 3D character standing in front of a hut that has a ghostly glow and ghost effects.
Level 2
30 mins

Goal 🎯

Create a hut and use material, particle, and sound effects to make it feel haunted to players when they walk nearby.

Personalise your world and character

  • Change your sky and map to create a Halloween feel for your world. Choose your own style.
  • Choose a character from the character options on the ‘add player’ block
  • Choose colours for your character
  • Make it as spooky as you like!
The Flock XR canvas shows a 3D world with orange sky and steep terrain that is red with an eyeball pattern. A player is standing idle in the centre of the world. Code blocks show the 'sky' and 'map' block and player controls.

Add a spooky hut

  • Click the + sign under the canvas and choose a hut from the 2nd row.
  • Click on the map floor of your world to place the hut.
  • Click on the rotate gizmo then drag the horizontal circle to rotate the hut.
  • From Materials, add the ‘tint’ block under the ‘add object’ block and choose a ghostly colour.
A hut in the 3D world has a ghostly glow and a rotate gizmo over it. Code blocks show the hut has been rotated to 40 on the y-axis and has a tint block.

Walk inside the house

  • From Transform, choose Physics then add the ‘add physics shape’ block inside the ‘add object’ block.
  • Make sure ‘type’ is set to ‘object’ to set the bounding box to the shape of the hut so that you can walk inside.
  • Press play and walk inside the hut to test.
The 3D character is shown standing inside the hut. A block has been added to use object as the physics shape.

Add spooky spatial sound

  • From Sound, add the ‘add play sound’ block under the ‘add object’ block.
  • Choose a sound then slow the sound ‘speed’ to 0.1.
  • Select play ‘from’ object1 to play the sound from the hut.
  • Change ‘mode’ to loop to repeat the sound.
  • Press play and walk to the hut to test that the sound gets louder.
The character is standing outside the hut. A sound block has been added with Footstep sound as per the instructions.

Add ghostly particle effects

  • From Scene, choose Effects then add the ‘add particle effect’ block under the ‘play sound’ block.
  • Choose a particle ‘shape’ and colours, ‘rate’ and ‘size’.
  • Tick gravity.
  • Press play to test.
The hut is shown with small ghost 2D characters from particle effects. The code shows the new add particle effect block per the instructions.

Take it further

  • Add more objects with particle effects and sounds.
  • Add more Material effects such as ‘highlight’ or ‘glow’.
  • Rotate the hut to an unnatural position to increase spookiness.

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.