Thursday, October 10, 2019

Unity Tutorial 02

This was difficult.

In the first tutorial i was taught how to import a sound object through an audio and FX folders.
The code for collecting the gem was complicated for me to make the gem play the noise and disappear but i copied exactly what jimmy said and i got it to work in the end although i'm not completely sure about the mechanics behind it all.
Next i made a box collider and jimmy also spoke about mesh colliders, which make the object disappear script relate to you touching off the gem with your character.
He was confusing me when he spoke about referencing the object, he seemed confused himself as to  why the script didn't work when you put in "this" referring to the object. I ending up using the code that works for him which references the gem and i had no problems with that. 
Then i moved on to making my little pond of water using the prefabs and dipping the terrain to create a space for the water to go which worked out nicely and was simple enough to create.
After that i worked on making my box into a wall by stretching it out and applying wall texture to it with the normal map texture i made from the assets, and i also was able to duplicate the wall which i can see saving me lots of time in the future! 
With the rock texture i played around and tried blending for the first time, i found it to be difficult to get a nice blend even with the lowest opacity but i personally think the textures really didn't blend well to start with. I also was able to add shadows now, i like the big difference shadows made to my world and how simplistic it is because its built into unity there is no code involved and you gotta love that! 

In the second tutorial i explored UI elements. 
I made the curser which defines where we look in the game and focus where we go by using canvas. I liked this addition i made mine a white diamond and it made walking around in my game less confusing and really focused my attention to the centre.
Then i started with the ray cast element. I learned that this is a way of defining how far away the object your looking at is from the player.
i made a player casting script, but i didn't quite understand the terminology he used about how he can reference this script in others by making it a "static variable". The ray cast worked in the end and i got it to show me how far objects are away from my player. 
I thought this was the hardest tutorial so far and im still quite confused on how i got some things to work which annoyed me because i would rather know how so i can do it again when  i need it for my own game.



No comments:

Post a Comment

Feedback Strategies

link Be a Mirror: Give Readers Feedback That Fosters a Growth Mindset In this article they talk about how thinking of your fee...