Skip to main content

Unity Tutorial 02

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.

Comments

  1. 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

Post a Comment

Popular posts from this blog

INTRODUCTION

ABOUT ME My name is Nhu Thai. I am really shy but after you know me you will probably regret knowing me. I love meme, I mean who doesn't? I am the oldest and I have 2 annoying brothers and one told me to write that he's a good singer...he thinks he's Beyonce... The best module I took from last year was probably web development because I like doing the coding but I also hate it at the same time. I understood it because I took down notes and ask the lecturer and classmates for help. When I saw that web development was one of my highest grade I was shocked and happy.  Career wise... I don’t really know exactly what I want to do. I would like to go and do something that involves media but I still don’t know if I want it for the long term yet. If I am doing it for the long term, I would like to go to graphic design or photography or website design.  Over the summer, I went to Disneyland Paris again. I only went because my little cousins wanted to go and I thought it

Game Vision Statement

Zoobe is what the name for the puzzle and adventure game I want to design.  It is a game where you are an animal, in a shape of a box and trying to escape from the zoo without getting caught but the humans or traps. The background story for this game is that one night the animal decided that they want to get away and out of the zoo and be free. Some nights after, one of the animal's gate was left unlock and left their "home" behind them. Since all the animals wanted to be free and actually go back to the jungle. The animal that escape went to get the key for the gate, with the help of other animals trying to get the zoo keeper drop the key to all the gates. To play this game, you are the animal who's gate was left unlock and have to get the key to open the other gates for the animal. The animal can't move by itself so you have to move them yourself without getting caught by the zookeeper or traps. To free the animal you either have to move them to the box that

Game Idea Research

Last week I brainstormed some different game ideas. This blog will be about one of those ideas and it will be the type of game I would enjoy working on for the rest of the semester and I will be focusing on the three possible game mechanics ideas that I know would work well for this assignment. The game idea I am going to focus on will be a puzzle game, my third game idea from the  Game Brainstorm  blog. This game idea was inspired by all the games I played and used to have on my phone. I want to create a game that's challenging but also fun to play. A game where the setting is in the sky and you have to move a box or something where it's supposed to be but there will be something trying to make you lose and think of your next move. Each level getting more difficult. The three or more game mechanics/rules ideas, I was thinking that would work well for the game is: Instant death  - Something causing the player to die instantly, maybe an spikes or a person/creatures Unco