Skip to main content

Posts

Showing posts from August, 2017

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 3 rd 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...