Some of the essential things I needed, Materials, Movement settings, Platform Settings and Nav Mesh.
Enemy Script
I wanted the Enemy script to be simple and quick, so I just made the AI move to where the player's position is, and add a stopping distance so they don't get too close. The AI would use NavMeshAGent to detect places it can go.
Missle Script
Writing this script was quick and easy, as all I wanted the missile to do was spawn in front of the player and move at a speed of 10. Then destroy the missile so it wouldn't go on forever.
Camera Script
For the camera movement, I wanted the camera to move with the player. Nice and simple. I attached the script to the camera and told it to follow the player. I also rotated the camera down a bit and moved it behind the player.
Cube Rotation
This script was for the PickUp item, This script enabled the item to rotate on a vector.
Lift Script
This script was written by Jack Hogg
This script was for the lift to move up and down, it was also for the player to attach to when the player would go on it.
Player Movement Script
This script is related to the player's movement, collecting points and displaying the score and win screen.

Score: score starts at 0, the PickUp is a prefab and set as a trigger and a tag with PickUp, so whenever the player comes in contact with the item, the score would go up by 1. The score gets updated and is displayed on the top left. The script also knows how many points need to be collected by the player in order to enable the winning text.
Every time I added more PickUps I needed to back to the script and change the final amount the player needed to win.

Missile: There is also a script in here which lets Unity know the player has pressed the space key, in which case it would shoot a missile. The missile also has a speed set to it.
I first tried making my prototype with an Input system for the player. It worked out, I could move around and collect points, and even the enemies followed the player around. But for some reason after placing down more objects and platforms the player couldn't move at all. For some reason, the player would be able to move if I turned off gravity. This was very odd as the player would start floating as I moved away from the platform. So I decided to make another project and use a 3D movement script.
Video of the player with no gravity
Nav Mesh
Doing the NavMesh was an important part for the player and enemies. This helped them know where they could move around and the areas they could move around in. One important step for NavMesh was that you had to clear and bake again once you had placed down more obstacles. You had to update NavMesh for the enemies, One of the key steps. I also started messing around with the radius settings, I did this to see how the player and enemies reacted if they got too close to the obstacles.
Finished Game Level Layout
Build Notes
Finished Game build
Back to Top