Today in Unity I have created and coded a game on my own. My first thoughts for this game was to have a spot light get brighter and bright when I get closer to a model that I would import in. So far I have coded a character to move forwards, backwards, left and right. I have also coded the camera to follow the mouse wherever it goes. The coding part was challenging put I managed to sort it out. Also in the code I have added a few lines to make the camera rotation and the character movement to be smooth when they do what they need to do. Another thing I added was when the game loads up the cursor disappears. To get the mouse back all you do is press the escape key.
Here is a few lines of code that I have written to create this little scene;
Character movement –
Camera Controller –
The next time I work on this game I will code the spot light to make it get brighter when I get closer to my robot model.