The section of the tutorial we covered this session was World Interactions - Dialog Raycast.
The tutor made sure to record what he was doing, so we would have a video to look back to after his initial explanation: https://vimeo.com/689692898/ac1284d207
The main aim of this section was to create an NPC that could talk to by pressing a certain key.
After the complexity of the last few sections of the tutorial, this was a lot more simple, which was a welcome change.
Like last session, a canvas layer was needed for a majority of the exercise, specifically to make the NPC's dialogue box.
The main challenging part of this section was to make sure that the player character and the NPC would interact properly. This required a new section of code to be added to our "Rubycontroller" script.
This extra code used a physics system known as Raycasting, which according to the Unity website "is the action of casting a ray in the Scene and checking to see if that ray intersects with a Collider". The main details we had to specify were, the origin point for the Raycast, the direction it needs to go in, and how far in front it would stretch
We also had to code in a timer that would decide how long the dialogue box needs to be displayed after the activation button is pressed. This needed to be added to a new script that we could use just for NPCs.
By the time this section of the tutorial had been completed, we had a couple hours of spare time left. During this time, we were shown through the process of creating a platformer, using our Ruby's Adventure exercise as a base.
The tutor made sure to record what he was doing, so we would have a video to look back to after his initial explanation: https://vimeo.com/689692898/ac1284d207
Because of this, I decided to just listen to him the first time around without doing anything, and only try do it myself afterwards using the video.
By the end of the day I had gotten just a little bit over half way into the video. For the most part, the steps were not too difficult, and most of the skills we needed to get it done had already been taught to us over the course of the last few weeks.
Comments
Post a Comment