AR Basketball Spinner and the Kinect

Last week we highlighted a post from Vangos Pterneas, Weight-Lifting Bar Detection with the Kinect. This week we’ve got another from him and it’s sports related too!

Augmented Reality Basketball Spinner with Kinect

Back in 2014, I had the opportunity to work with an amazing agency from Madrid regarding the Mundobasket Contest, held in Spain. My job was to develop a first-class Augmented Reality experience for Globalzepp and Liga Endesa, the official Mundobasket sponsor. The application was placed in Plaza del Callao and more than 30,000 people had fun using it.

The concept was pretty simple: people stood in front of a Kinect sensor and played with a spinning ball, just like pros! The app recorded their movements and projected the result on a huge video wall. Back then, the app was developed using Kinect v2, C#, and XAML.

Today, I’ll show you how to develop a similar experience using Kinect and Unity, step-by-step! By my side today is Mike Miropoulos, Unity Developer @LightBuzz, who’ll guide us through the bits and bytes of Unity. That’s the demo we are going to implement together:


Video & Source Code

As usual, I’m providing you with the complete source code, along with a demo video.

Building the User Interface

We are building our User Interface using the powerful Unity Editor. Launch Unity, create a new project, and specify its location. Then, you should see the Editor window.

Step 0 – Add the required plugins …

Step 1 – Configure the Main Camera…

Step 2 – Add the Color View…

Step 3 – Add the Ball…

Step 4 – Add the Script…

Adding functionality

Step 1 – Members…

Step 2 – Initialization…

Step 3 – Display Color…

Step 4 – Detect the hands…

Step 5 – Map the coordinates to Unity space…

Step 6 – Rotate the ball…

Step 7 – Dispose…


So, this is it, folks! Hope you enjoyed this tutorial. Feel free to extend the source code, add your own effects, constraints, and functionality, and use it in your projects.

‘Till the next time, keep Kinecting!

PS: Vitruvius

This project is part of the Premium version of Vitruvius (original cost: $299). Vitruvius is a set of powerful Kinect extensions that will help you build stunning Kinect apps in minutes. Vitruvius includes avateering, HD Face, background removal, angle calculations, and more. Check it now.

Project Information URL:

Project Source URL: Download the source code (and be sure to star the repository)

Contact Information:

from Channel 9


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s