Skip to main content

Unity Tutorial 03

In this Unity tutorial we learned how to utilise the programming language C# in our games to rotate the arms on a clock that we've made in the Unity Editor.


The tutorial was on this page and it was relatively easy to read through and follow. I started from the start in building the clock face out of a 3D Object in game. In this case I used a cylinder. I flattened the cylinder to create a face and moved on to making the hour indicators. For this I had to use a cube 3D Object, and make it long and narrow. I then learned how to use the hierarchy system in the Unity editor to make multiples of the hour indicator. Each time I duplicated one I had to increase it's y rotation by 30 degrees to move it along the clock face's axis. These indicators were then taken from their 'parents' in the hierarchy system and placed as 'children' under the clock object.

Moving on I created the arms next, making each of them a parent of their own for the hour, minute and seconds arms. They all were made different sizes and their rotations started them at the 12th hour on the clock. Now it was time to animate them, and this is where it gets challenging.

This is where we begin to use C# script in Microsoft Visual Studio, and it links in to Unity and updates as we save it. This took a while and a lot of making sure that the code was entered correctly (much like with our Web Development module). To finally get the clock moving was a great feeling and I'm glad I know some of the basics in animating objects in Unity. I know this will help a lot towards my game further down the line.
My Clock a little over halfway into making it

Comments

Popular posts from this blog

Introduction to a Future Game Developer & Film Producer

Introduction A photo of me taken by James Reynolds My name is Christopher Carney, and I'm an aspiring Creative Digital Media student hailing from IT Blanchardstown (soon to be one of three campuses as part of the Technological University of Dublin). I have interests in everything digital media from graphic design to filmography and everything in between. I'm a 'jack of all trades, master of none' who is constantly looking to challenge and better themselves, yearning to learn and gain experience in anything I can try my hand at. Education After I completed my leaving certificate in 2015 I went on to study in Dunboyne College of Further Education for two years. In my first year I studied Sound Engineering & Music Production at FETAC Level 5 in 2015. This was a fun and active year long course in which I expanded on my previous knowledge of music production, and learned a lot about sound engineering. We organised a gig that year as part of our course in whi...

Favourite Game

My Favourite Game Battlefield 1 is currently my favourite game to play. I have been playing it since it's release in 2016 and although I take a break from it to put time into other games I always find I come back to it. Battlefield 1's campaign is short and fun, with a lot of insight into the history of WW1. The multiplayer feature is where I spend my time in the game though, playing in battles of 32 vs. 32 players on each team, spread across some of the largest battlefields of WW1. The game is beautifully made, with realistic graphics and animations and the playable maps in the game take direct influence from photos and stories of the real battlefields from the time. A screenshot from within Battlefield 1 - Source

19Sixteen Progress - Week 10

As of Week 10 all the members of the 19Sixteen group have been assigned specific roles and things to research in relation to their roles. All members also have tasks due for next Thursday so that we can start building on our game. I myself took charge of reorganising roles to fit our six week timeframe and along with James Reynolds we merged the Assets and Level Creator teams as they will need to work closely together to build our version of D1. I also took charge of drawing out a map of the area we are creating for the game so the level creators can build the game world based on a specific area. Sketch of Dublin 1, the area that we plan to make