More Maths (and solo game update)

Magnitude Formula’s

Today in my Coding lesson we started by learning about normalisation and magnitude. Magnitude is basically the length of a vector. It is calculated using pythagoras.

An example of magnitude being used in a game is to measure the distance between 2 objects, e.g. the character and the objective. This can be coded by using: Vector3.Destination

Normalisation sets the magnitude to 1. This can also be known as 1 unit vector. To normalise co-ordinates you divide them by the magnitude.

An example of this is (3,4) with a magnitude of 5. After dividing the co-ordinates by 5 you should be left with (3/5,4/5). This will go to (0.6,0.8).

For my next coding lesson I need to research Instantiation, While Loops, Probability and Averages.

For my solo game I will hopefully be creating a maze game. I haven’t started to create it yet but I am about to start planning it


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