I am building a simple driving game using a logitech G29 steering wheel
I met an issue where I can’t brake when the car is in reverse. The only way I can brake is release the reverse key, press on the accelerator and it will work normally again.
I uploaded my code due to the forum does not let me post it fully
I made modifications at line 219 and 243.
Begin by liberally sprinkling Debug.Log() statements all over the parts of the code that are supposed to back you up or apply brakes, and see if any or all of that code is actually running.
Once you determine it is actually running, then start to print values out that are used for deciding to brake, how much to brake, etc. and debug it all the way back to where the values are wrong.
I found out a funny bug where if the car is in any form of movement that is not forward, like rolling backwards or in reverse, the brakes just don work, so apparently if the car motion is backwards, the brakes will not work.