Skip to main content

Week-12

Player controller flies when you climb up terrains and move towards the center , this is a bug we noticed a few weeks back but I forgot to address the issue back then due to doing other tasks . The problem was very simple but took me a while to understand with the help of our facilitator. The problem was that I was using velocity for movement but I did not take into account the velocity of the gravity which made the player look like it was flying although this was not the only problem with the movement, the player needed to move in the direction the mouse was pointed in as well.  


To address the flying problem, I specified the vector the player should move in the 3rd line of code by creating a new vector where the x & z input would be taken by get axis.


second problem was that the forward of the player should be the direction it is looking In which is solved by using Transform Direction which converted from local to world space and resolved this issue . Lastly the 5th line of code takes the actual gravity into account which needs to be added after the calculations for the new vector are done or else there will be another bug where the player would look like they are flying as long as the movement keys are pressed.

Another bug I solved during the week was with the jump mechanic where in you could keep jumping as long as the jump key was held down , this was easily solved by creating a bool which would be true when the player is on the ground & false when he is jumping , as can be seen in the code below .



There is also a minor bug in the door animation playing as it takes a long time for the animation to play which is not a problem in my code as I have tested it thoroughly . After looking the bug over our facilitator it turned out that there was a problem un the animator state where one of its transition settings”has exit time ” was checked which would exit the animation every time it was called .

Comments

Popular posts from this blog

Week-2 The pitch

For this week we spent our first day pitching our game with a few refined mechanics which was given a go ahead by our lecturers with a few scale backs in terms of the story with a few helpful recommendations such as ways to communicate the story where in we could have audio logs throughout the game. I am setting goals for this week wherein I am going to finish a re usable night/day cycle and work on changing the skyboxes at run time as well. For our second class we have had a look at algorithms along with their time and space complexity which was a good recap for the studio 2 students as it gave us a refresher on the topic. In addition, we also had a look at the inner workings on a linked list (Commonly known as a list). Lastly for our third and final class for the week , we worked on the practical implementations for the queue   and how it would work if it were written without the system.collection.generic library . I have also taken the time to get a better understa...

Week-9

This week we have been integrating pathfinding into the game, this is the one I had worked on for my trimester one project thus It was working well with our project & was easy to integrate but it is not being used by the behavior trees yet thus we are not going to show this mechanic for our presentation due in a few days. We have also managed to get our new poster for the game which looks pretty good and reflects on the game design we implemented into our game. We don’t know if the new poster will make it or not but we have high hopes for it . We also have a logo for the game which can be used as the icon for our final build for showcase . We had a few setbacks during integration where some of the group members worked in the same scene & commits to it leading to our scene for the demo looking like Frankenstein’s monster although we were able to fix most the changes the day before the presentation & because we had version controls and...

Week-6 Terrains !

While working in unity’s inbuilt tree system I found a bug wherein it did not render the trees until the player was close to the camera, this problem was something very frustrating at first but after investigating the problem I found that you had to use a speed tree shader in order for the tree system to work properly & render the trees. The shader that I selected was nature/speed tree which can be seen below. Also just as an update, we are not focusing on the low poly art style as it no longer works with our game according to our game designer. For this week I have also started work on the bow & arrow mechanics for our game which seem like a walk in the park as we have worked on similar mechanics in projects for our previous trimesters. We have also received an asset for our shack which seems to be very basic, looks like some cubes were just resized by the animator but our game designer was the one to choose it & has convinced us that it is...