top of page

Coding skills: Part 5

One of the major bugs I encountered besides the camera script not working after relaunching was certain animations either playing at completely the wrong time, or not playing at all. As a very brief example, a fairly recent bug I encountered was how the player would clip on edges, and the falling animation would play even though the player had not fallen off. After looking around the code for a while, I realized that changing my code would not fix the issue. This was a mechanical issue with how the capsule collider was interacting with the edge of the box. In essence, the code had been instructed to start playing the falling animation if more than half of the capsule collider was not detecting ground beneath it. While this may be a crude method as of now, I am always looking to change and play around with my code. Regardless, what was happening was that when the player was standing face first against the edge, technically more than half of the player's capsule collider was over the edge, but hit feet were still on the edge. This meant the animation started glitching, and started falling and then stop. I have not found a solution for this yet, but I think once I start creating a function for how the jump is going to work, I will find a solution for the issue.


Another small example I wanted to bring up was the taking damage function and death animations. Often completely randomized, sometimes when the player health drops to 0, the character plays part of the death animation, but is then still able to function. Perhaps when the last tick of damage before health reaches 0 is done, the damage and death animation are colliding, and hence the bug. Either way, I will find a way to rectify all of my bugs, and tomorrow I'll be writing about some more of my progress on the game.

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page