Toby Jake Allen

Today I did a games engine called Unity. I made a new project, in 3D, called Maze. It’s not a maze right now, just a weird abstract place where you have to stare at the sun (I’ll get to that later).

The default camera and directional light (a.k.a. sun) appeared. I immediately clicked on the camera, bringing up an editor window. Then, I clicked the ‘add component’ button at the bottom and waited for Visual Studio to load.

Once it had, I looked some things up and typed in some code to set the camera’s Y rotation (whether it’s looking left, right, forward or backward) to be equal to the mouse’s X position (how far the mouse is to the left or the right), and the same thing for the X rotation and the Y position.

Unfortunately, this made the camera look to the left if you tell it to look to the right, and look to the right if you tell it to the left. Oh, and if you look too far up or too far down, everything vibrates in a really weird and confusing way.

The first issue could be solved by making the camera do the opposite of what it was, by adding a minus sign. The second issue could be solved by stopping the camera from looking that far up or down.

It worked perfectly (sort of). The camera looked around too fast, so I snuck in a divide by 2. Not sure if it did anything, but oh well.

Finally, so that there were some interesting things to actually look around at, I added a sphere, a cross and a big rectangle. And a floor.

And then it was done!