Animation Final: Unity

Published December 21, 2017

For this project, I used the Unity game engine and /assets from Mixamo and Thingverse to create a small game in which a player navigates an “Oh the Places You’ll Go”-esque landscape as a samba-dancing older man who collects golden cassette tapes to play his favorite tunes.

Terrain

After making the terrain in Unity’s terrain builder, I added trees from the asset store and the terrain builder.  Frankly, I’m unsure what the difference is between trees made in the terrain builder and trees dragged-and-dropped onto the scenes main folder (so they show up as individual /assets.  I suspect you’re meant to populate a map with trees through the terrain builder, but am unsure if that is computationally less expensive, or just less labor intensive…

Wanting a ground like Dr. Seuss’s “Oh the Places You’ll Go,” I made up a texture with stripes of the same color:

 

This was then applied to the terrain as a texture and produced a ground pattern which failed to repeat with itself.  To make the texture seamless, I saw online that I could flip it horizontally and vertically and offset the results to create a repeating pattern:

Below you can see the difference between the original texture and the seamless one:

Cassette Tapes:

In order to add the cassette tapes to the game, I followed along with this “Roll a Ball” tutorial.  I found a cassette tape asset on Thingverse here in STL format and used this online tool to convert it to an OBJ file accepted by Unity.  I wanted each cassette tape on the map to play a different song when the character walked through them.   Scripting wise, the most difficult part for a neophyte such as myself was to trigger an audio source to play at a single point in 3D space (the location of the tape), rather than globally in the game.  This was accomplished (with quite some help in person and here) using the PlayClipAtPoint method of an AudioSource.   

This done, I ended up with a game which looked like this: