Monday, November 9, 2020

Unity Tutorial 07

 Looking at the introduction video it was very overwhelming to see what I will be doing in this week's unity as the player was not a person or vehicle but a ball that the player must try and not fall off.

The first thing was adding a focal point in the middle of the game as this is the point that the camera will be rotating around. By clicking and dragging the main camera to the focal point it is now a child object of the focal point. Then by adding a player controller script to allow the player to be in control by using the arrows. 

Lesson 4.2 -  Adding a new script called enemy. next adding a new folder called physics material and adding bouncing material to allow both the enemy and player script. Within the enemy script adding a variable to allow the enemy to bounce off the player.  I then added a new folder called prefab and added the enemy to this and deleted it in the hierarchy. Then created a new folder spawn manager and added code so the enemy will appear from anywhere at the start of the game 

Lesson 4.3-  The first thing was adding the gem to the hierarchy and changing the name to powerup, then added a box collider and a tag to the powerup. In player controller I then added a bool which is if is true to false. Next was adding a visual indicator. 


 

No comments:

Post a Comment