A screenshot of Unity3D |
While watching the two tutorials to adding some codes and explaining how and what is it for. I know how to add in the sound and making the gem disappeared, water and the ray cast to Unity3D.
Adding the sound and making the gem disappeared, you need to add codes into your GemRotate scripts. The code for that would be "public AudioSource CollectSound; public GameObject TheGem;", this will tell unity and this is the sound for the gem. To make the gem disappeared when the player hits it is "void OnTriggerEnter(Collider other)" and if you want as soon as the player hits the gem to make a sound you gonna add in as few more codes underneath that code. At first I had a problem with it because I didn't realised I typed something wrong, also recheck and reread what you are typing.
Once I got all the codes and followed the tutorials, I tested it out playing it in first person POV. I thought it was so cool how it disappeared and I didn't expect to it work. The sound was loud for me so I changed the setting of the sound that I saved in Sound -> FX -> Ding001.
Making the wall that was easy enough, all we had to do was change the size and to do that is to change X,Y and Z. Once, you change the size of the cube you had before, you just duplicate and move it to make it looks like a wall.
Adding the water, cursor and ray cast was pretty easy since I had the tutorial to follow but I know for sure if I don't have these tutorials to help me I probably be so lost and won't even use Unity in the first day of getting it. Water was simple because all you want to do was make a dip and add in the water assets that had for use to download from their website.
Having a cursor is useful to see what the player is looking, we didn't have it before but it was okay. You had an idea where the player was looking but having the cursor you know exactly where the player was looking at. Ray casting was done mostly on script. Adding in ray cast needs longer coding than what we done for the gem. Ray casting is just to see the distance between you and something for example a wall. If you wanted to know what is the distance between you and a wall, having ray casting would let you know the distance. Ray cast was a little more difficult than the others but it wasn't that bad.
What I am looking forward to is to learn more about the tools and techniques we can use in Unity but at the same time I am nervous because I know it will be difficult at some stage. Hopefully, I will use something I learned today for my game assignment.
Great to see your enjoying using Unity, like most things the more you use it the easier it will become - keep practicing and if you want some additional tutorials give me a shout!
ReplyDelete