Interpreting Feedback and Implementing Fixes
|
During the last playtest session, most of the feedback we got was related to the movement. Some found it pretty easy to use and liked the way it worked, while others found themselves hitting walls constantly. As a result of this, identifying the problem was relatively hard. The way we decided to try and mend the problem without completely redoing the movement, since a lot of people liked it, was to start of by fixing the stone walls since we knew there were problems with those. The problem with the stone walls collision boxes is that they aren’t actually solid, since that used to cause other problems, but they are so called “Triggers”. What this means is that instead of being solid they are just scanners, meaning that you can get information and manipulate that information through code. The way we used these triggers was to check if the player entered them, after which we stopped the player’s movement. The problem with this solution, was that the player was able to move through the walls, albeit at a very slow speed, due to the code for the player’s movement and the trigger code being executed at the same time. ![]() I decided to try and help the programmers with this, since they had other things to fix and implement. The solution I came up with was to use 2 so called “Raycasts”; a raycast is a ray that is fired from a point in a direction and can detect & provide information about objects that it touches. The way I use the raycasts is by having one raycast check for stone walls in front of the player, and one that checks for stone walls in any movement direction the player presses. If the first raycast finds a stone wall, it will disable further movement in that direction. If the second raycast can’t find a stone wall in the direction the player presses, it will re-enable movement. The reason I use 2 raycasts instead of one is because of the rotation of the player. Since the player can rotate their character there is a need to always check for a collision at the front end of the character’s broom.If the player character’s front end of the broom collides with a wall the movement has to stop, yet the player has to be able to easily turn in any other direction, which adds the need for a second raycast. ![]()
|

