Assignment 4 : Second week

    Last week, we started working on the fourth assignment, the last one in the course. Having a broad idea of what we wanted to make, we started working by finding the necessary assets and researching about useful library or tools to make our workload easier. As stated in the last week's post we decided on doing a horror game which made use of the hand tracking mechanism.

    For the most part, this week was about researching about hand tracking, creating the map and fixing the monster's animation. There are quite a few detailed tutorials about hand tracking and how to manipulate objects in different ways, but we had a problem in figuring out the players movement. Because there is no joystick to use when hand tracking, we had to figure another way of managing the input for movement. The options we have found so far are by casting a ray and teleporting to the location, or having continuous movement with a certain gesture. We have not yet made a decision on which way to implement it. 

    Regarding the map, we had big problems when pushing to version control. Because the file size of the map was immense, the time to upload/download the changes was up to 30 minutes, sometimes even crashing Unity. We had to change this quickly, as we could not continue our work this way. We found another map that fits our game, and which is much smaller in file size then the previous one.

    For the movement of the monster, we already had the animations prepared from the previous week. Now we had to make the monster chase the player. To do this, the component Nav Mesh Agent was added to the monster game object. This lets us set not only the movement speed and acceleration, but also some parameters about obstacle avoidance, like radius, height and auto-repathing. We set his movement and animations to a low speed, as we wanted the focus of the game to not necessarily be about running away from the monster to a final destination, but to be about passing the tasks or puzzles given in order to finish the game. The script for following the player is simple. We get the instances of both the player and the monster and set the destination of the enemy to the position of the player in the Update() method.

Nav Mesh Agent component
EnemyFollowsPlayer script

As the set up is almost finished, the next objectives for the game will be to finish implementing the hand tracking and character movement, and coming up with some ideas for the puzzle tasks/ flow of the game.

Author: Alexandru Jurj

Comments