Professional Practice: Unity Official Tutorial Videos – Script Basics and Physics Basics

After going through some of the book I was reading in the previous professional practice post, I realised that the program used in the book is of an older version to what I had, so it wasn’t as practical as first thought. So I decided to follow the official tutorial videos that unity creates for it’s users to get a basic understanding of other components within the software.

The tutorials can be found here: http://unity3d.com/learn/tutorials/modules

Scripts

Scripts are what make the game work, it’s the code, how things move, when they move and how they move etc. You can code in Javascript, C# and boo.

Firstly I started with following videos on some basic scripting, taking notes of important terms used to create code. Various codes features include:

  • Variables – This is a box that contains different information. E.g, .int ((integer) holds a number)
  • Function – Takes the box and returns another.
  • if Statements – Makes a decision based on a condition. E.g, when a box moves to a certain location, then the if statement moves it elsewhere when it reaches said position.
  • Loops – A way to repeat lines of code.

Although this is very minimal in the scripting, these are the nuts and bolts of code and is what brings it together, I will add more terms when I get deeper into scripting.

Physics

Colliders – Colliders are a component that allows a GameObject to react to other components with colliders, one of the objects must have a rigid body component added to it. There are 3 different colliders that can be applied, sphere, box and capsule. If the object being collided is a complex model, then the user can attach multiple colliders to one object.

Mesh Collider – A mesh collider wraps around an object for you, instead of creating multiple colliders, put this can be quite processor intensive.

Trigger Colliders – A trigger collider is used at a sort of button, instead of when two colliders meet in the scene and react to each other; the trigger collider will allow the triggered object to pass through the other collider, when this happens the user can set some code in a script to make something happen in the scene. To make an object into a trigger, there is a simple checkbox at the top of the objects inspector.

Physics Material – A physics material controls the surface of an object and how it responds to other objects. For example a basketball would be bouncy and have a bouncy physics material attached to it, each material has settings that can be altered in the inspector. Below are a couple of animated pictures that show a bouncy material and a hard, heavy material and how they reacted when they collided with another object.

http---makeagif.com--media-12-11-2013-pQk3lc

Bouncy Material

http---makeagif.com--media-12-11-2013-u7Piv4

Hard, heavy material

CLICK IMAGES to see how they moved

Joints:

  • Fixed – A fixed joint locks an object to a point in the world or to another rigid body component.
  • Spring -A spring joint is relative to a GameObject and not the world, they work by the game object trying to reach a target position. (like a swing)
  • Hinge – This joint, when added to an object will allow it to rotate around the anchor point. The anchor point is a point where the object moves around and can be moved to designated areas on the object.

I have learnt a great deal of information from following these tutorials, as they are visual, it helps to know where to go exactly. I will definitely keep following these tutorial videos in the future so I can get a wider knowledge of the piece of software.

Advertisements

~ by reeceharry on December 12, 2013.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

 
vegetrouble.wordpress.com/

( Project Example)

subjectanomaly.wordpress.com/

The Final Major Project of Matt Lane

Reece Harrison

Year 3 Game Design HSAD Student

Sanctuary Games

David Smith - Games Designer, Gamer and Full Time Geek

Hms Hunter

From the Ashes

shevysupreme

A fine WordPress.com site

AS3 Game Tutorials

Complete Flash game tutorials in ActionScript 3

Kevin Holbrook's Blog

Student at Hull College - BA (Honours) Degree

dalehaughey

I am currently studying games design at the Hull school of art and design and this is the work i have been doing.

%d bloggers like this: