What I Did Today:
Today I followed the next tutorial which shows showing up the playing area. First i made a new blank game object named walls and reset its position. Then i made a cube and named it west wall and made it a child to the blank game object i made to help organize the project. I scaled the first wall to fit the edge of the ground and set its transform to rest perfectly on it. I then duplicated it, renamed it east wall and set its transform to fit the east side. I did this for the north and south side as well. Finishing off the tutorial I set the editor to local mode which allows you to see the transform move in play mode.
With extra class time i decided to start the second tutorial. The next tutorial is adding the collectible objects. To start it off i created a new cube game object and renamed it pick up. Since the player game object was in the way i unchecked the box under transform deactivated it in the scene. The cube needs to attract the players attention so it was made half a unit cubed to make it smaller and appear like its floating above the ground, i also set all of its rotation axis to 45 degrees so its more eye catching. I then needed to make it rotate so i created a new script called rotator. To make it i had to code: "transform.Rotate (new Vector3 (15, 30, 45) * Time.deltaTime)" to make it rotate. After saving it and hitting play it does in fact rotate. I now have to make it into a prefab which will allow me to use the same object in any scene of the project and all changes to the prefab will effect all the prefab objects. I then dragged the pick up game object into the new folder i created turning it into a prefab. I then duplicated the prefab (in hierarchy) 12 times and positioned then around the middle of the ground almost like a clock. I then changed the pick ups colour by creating another material and making it yellow. I dragged it on to one of the prefabs then hit apply to apply it to all of them. Now all of them are yellow and rotate.
What I learned:
I learned how to create prefabs and how they work, i also learned how to make an object rotate on its own.
What I'm Doing Next Day:
Next day I will be making it so the pick up objects can be picked up.
No comments:
Post a Comment