Teddy Wants Balloon

Built in Unity the concept was to be able to place down a teddy bear fully rigged using the MecAnim system and have him chase around trying (but never achieving) to grab a big red balloon using augmented reality.

As I only had a few hours in which to implement this tech demo (completely swamped with other projects) I purposely kept it simple.

So here is the process:


Luckily I had the teddy model from the Robo & Bobo game (developed for Nice Touch Games) and the Balloon is thanks to TurboSquid

The teddy works beautifully as a humanoid rig in Unity which helped save a hell of a lot of time


The MecAnim tutorial from Unity is a handy place to get humanoid animations for simple movements like walking, running and idle

Note: If you have never setup an animation controller then I suggest you watch this great tutorial provided by Unity

My animation controller for the teddy had an entrance animation exiting onto an idle state which would head into locomotion if a speed parameter increased or a jump animation if a trigger was fired from the script

The locomotion forms a blend tree switching between run and walk determined by speed parameter and left and right depending upon a direction

Only one problem of note here and that was a little bit of clipping with the hands, if I had more time I would shift the weights around, but the end result is fine for this demo

The jump animation I had did not contain movement in y which is annoying when I had set to apply motion, to get around this I added a curve to the animation called JumpHeight which I then call in the script if the Teddy is performing the jump animation, gives a nice rounded off little jump for the teddy.


I first tested my animation controller by creating a script requiring simple arrow key movement and jump presses, I always like to do this so I can iron out problems and perform reproducible steps easy enough

The second stage was to create some simple automated movement which consisted of setting the animation controller direction and speed parameters based on distance from balloon and angle using the cross of current and target rotations

Once the teddy reaches his objective (a set distance from the balloon) he then automates into firing the Jump trigger


I have had great results using Vuforia in the past so it was the obvious choice for this tech demo to provide the augmented reality portion of this project

Had a few issues with marker generation and you may notice from the video they look a little odd. I also found out I need to buy a new webcam as low level light conditions were playing havoc with its pick up of the marker, shame I lost my good webcam that I used to use


Set the world to be centered around the first marker which I then retrieve the placement point of (when at rest) to create the world around it. This way the teddy will not be interfered with while he is trying to reach his goal

I place a ground mesh (invisible) for the teddy's rigidbody which was not absolutely needed here but I had the grand scheme to expand this later on to include obstacles, ramps etc

The balloon is an interesting little fix as when placed using the marker the orientation and location may be too far for the teddy to interact with. To get around this I take the balloon marker location and then cast it onto the ground this way the Teddy and Balloon keep the same relative space and we can avoid the slightly more complex coding


All in all I hope you agree this makes a nice little tech demo and maybe a concept for a future title!