The game plan

We are going to build an AR ball throwing game that uses any table in your room as a play court. Players will try to make goals by tossing a ball into a basket or goalpost (for consistency, we'll use the word goal and court throughout the chapter to refer to goal posts or baskets and the play area). The game keeps score. We will implement several different ball games with types of balls, each with different physics properties. The app will recognize objects on your table as obstacles the balls can bounce off.

For implementation we take the following steps:

  1. Set up a new Unity AR project.
  2. Build a simple game court with goal target and ball.
  3. Throw the ball using touch screen input.
  4. Detect when the ball hits the goal, cheer, and ...

Get Augmented Reality for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.