Posts

Showing posts from February, 2019

Camera swing and other changes

Image
When i was in the research phase of my development a game that i looked into for inspiration was Wipe-out, This was mainly for the camera movement and swing as i think it works well with physics based vehicles and adds a nice amount of visual feedback to the player as well. I also feel like the camera game is very important to racing games as they need to be smooth and show off as much of the environment as they can so that the player knows where about they need to be driving next and have the ability to dodge obstacles as well. When setting the camera up i decided that the ideal way to achieve the camera movement that i wanted was to add the default camera to a spring arm, that way the camera would rotate around the player rather than world space. Once i had added the spring arm i made sure that i am only inheriting the Yaw camera input and no the pawn control rotation as well, I then added a small amount of camera lag as well and rotation lag as well as it adds a bit of flare to

Traction Correction - Bug Fixing

Image
This week i decided to go ahead and test my vehicle controller to see if there was anything i could notice that would need fixing or changing slightly. Whilst i was testing my movement and going around corners and sharp turns with my vehicle i realised that it had little to no traction at all, this meant that when the vehicle was turning it would drift around the centre of gravity. Now this type of traction would work well for a drifting mechanic if i decided to go ahead with one in the future but for the mean time its an annoyance just for regular acceleration. I started by making a script that would recognise which direction the player was moving in such as left and right this was a critical script as i needed to know if there was too much force added to one side of the vehicle or not enough on the other. After testing this script it would give me -0 if i was moving left and +1 if i was moving right, this way i knew which side the problem occurred. From there i then added one

Auto Orientate - Bug Fixing

Image
The first bug that i had ran into was that whenever the vehicle controller would crash into any other static object the front end of the car would rise up and allow the player to accelerate into the sky and this broke the game. This bug needed fixing as soon as possible and that's why i had set out to try and get it fixed by the end of the week. I tackled the problem by creating my own auto orientation blueprint that would send a ray-cast down from the player controller making sure that it is always going to cling to a surface making it harder to go off the road or bug out. As well as that just as an extra precaution i made another bit of scrip that would always auto orientate the players mesh back to its default rotation, this meant that when the player gets knocked by another player or crashes they will stabilise and go back to normal. After i had tried and tested the player controller i can see that it has fixed it for the time being, I will keep testing it for the tim

Advancing Player Controller

Image
The first thing that i had done was created the boost as it is an essential in kart racers this was done the same way the regular acceleration was created but this time rather than setting force i added force, this would then take the maximum force of the vehicle and then add more on top to add a boost. I then added the camera rotation by moving my spring arms yaw on a clamp so that the spring arm would only rotate around the character 90 degrees both ways so that the player cant just spin the camera around in a circle. I then found an issue where the camera could spin even when the character was moving and it would effect the steering. I found a solution for this and it was fairly straight forward all i did was add a rotator to the spring arm only and this has seemed to fixed the issue. For the rest of the week i decided to add a few smaller things into the player controller that wouldn't effect the game play but that are in most other kart racers, these are things such