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

Final Draft

This blog post has all the annotated blogs I researched. It is the final literature paper for this semester game project.  In case you missed my previous blog post, my game idea for this semester is to make a game for younger children in Primary School. Most likely going to be children from the age to 4 to 6. It's an interactive learning game. This game is about learning different subjects but in a fun and entertaining way. We got inspiration from Duolingo and Study Stack . The following annotated review will cover a wide variety of experiential learning that will focus on the experiencing children/students have with learning from school/home and social. Evan Ortlieb wrote about how experiential learning can have on students when learning in and out of the classroom. One of the main methods of learning is that we can learn from doing something, learning from our mistakes. Students who are interested in literacy and using technology and experiential learning should be a central...

MD2Final GDD

For the next few weeks, I would like to have most of the cartoon drawing for the game and that most of them are on the Adobe Animate with the game coded up. The last few days I have been looking at videos of how to get the game to go to one scene to another. When I couldn't get it to go one scene to another, I got it to go to one frame to another. The video GDD below and last week post talks about what we want for our Multimedia 2 game project. What we add to the GDD was how the game level will progressively get harder each time the player passes a level. We also add in the colour palette and the illustration we have for the game. We will have a group meeting and working together every Wednesday and Thursday. If we can't do that we have a group chat, most of our decisions were made through this. Game Flow Chart;