Traction Correction - Bug Fixing

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 more script that would then force to the opposite direction to what you are turning this way they would be more resistance when turning. This would simulate road traction to the player and this is perfect for what i am wanting out of my player controller, I made sure that when i was i was setting the force up i didn't add too much or too little it needed to be fine tuned as i have created a physics based vehicle and not one that would use wheels.




I made sure that when i set all of these blueprints up that i used variables, the reason for this is so that i can change the values later if i feel that they need tweaking after i have done a little bit of play testing. 






- JLP

Comments

Popular posts from this blog

Casual Testing & Slight Adjustments

Final Blog Entry

More Distractions and Bug Fixes