Skip to main content
Version: 4.0.0

Bounce Off

Utilize head-tracking and 3D physics to create a bouncing ball game.

demo

Open the Template

To use the template in your Effect House project:

  1. Go to Templates
  2. Click the Face tab
  3. Select the Bounce Off template
demo

Hierarchy

There are two render groups in the Hierarchy panel:

  1. The General render group contains the Head Tracker object, which tracks your head and uses it to move the llama's head in order to bounce the beach ball and obtain points on the scoreboard.
  2. The 2D Foreground Effects render group contains the objects in the game, like the llama (head, neck joints, body), beach ball, score, and background frame.
demo

Assets

The Assets panel contains the built-in assets for this template. Replace them with your own materials and textures to customize the game.

demo

Visual Scripting

demo

The Player Follow Controller subgraph tracks your head movement and uses it to control the movement of the llama. Each option works as follows:

  • Target To Follow: Tracks and uses your nose to control the llama's movement
  • Touch To Follow Instead of Target: When checked, the llama's movement can be controlled by touching and dragging on the screen. When unchecked, the llama's movement will be controlled by your head movement.
  • Offset: Applies an offset to the tracked movement. When set to (0,0), it will track the movement exactly.

The Game Controller subgraph contains the logic for gameplay. Each option works as follows:

  • Auto Start (First Round): When unchecked, the game will not start until you move your head (or touch the screen, depending on the settings above). When checked, the game will start automatically.
  • Delay to Start: The amount, in seconds, to wait before starting the game
  • Random Ball Drop Position: When checked, the ball will spawn from different positions at the start of the game. When unchecked, it will spawn from the same position.
  • Ball Gravity: Changes the gravity applied to the ball, making it appear heavier or lighter, depending on the setting
  • On Hit Score Amount to Add: The amount of points to add to the score when the ball bounces on the llama's head

Click into this subgraph to learn more about the game's settings. Modify the logic to fit your own game's requirements!

Customize the Ball

We have provided a couple different ball options for you to try out. Check the one you'd like to use for your game in the Hierarchy panel and refresh the game in the Preview panel to see the change. Add your own materials to customize the ball even further!

demo

You can also edit the Physics Matter for each ball to customize its physical behavior in the game. Select the appropriate physics matter for the ball you'd like to use in the Assets panel, then edit the properties in the Inspector panel.

demo

Customize the Animal Character

Choose between different animals to further customize the game. Head to the Textures folder in the Assets panel to find the various animals to try out.

demo

To change the animal from a llama to a dog:

  1. Go to the Hierarchy panel
  2. Select Body [REPLACE]
  3. Go to the Inspector panel
  4. Replace the Texture in the Image component from LlamaBody_Tex to DogBody_Tex[TRY]
  5. Repeat these same steps for the 5 neck joints
  6. Go back to the Hierarchy panel
  7. Select Head Idle [REPLACE]
  8. Go to the Inspector panel
  9. Replace the Texture in the Image component from LlamaHead_Tex to DogHead_Tex[TRY]
  10. Go back to the Hierarchy panel
  11. Select Head Hit [REPLACE]
  12. Go to the Inspector panel
  13. Replace the Texture in the Image component from LlamaHeadHit_Tex to DogHeadHit_Tex[TRY]

Refresh the game in the Preview panel to see the changes.

demo