Only one line of code
Only one line of code
For a while I was having trouble with a part of the drifting where the kart would completely stop at the drift zone. I made sure the trigger for the box collider was on so I was confused on why it would completely stop. I checked and messed with the drifting part of the code that maybe it was a way I made it but it still didn't work. I was working on it so much I reworked the drifting 3 times and even added a second boolean and I had no clue. Then after looking at how I'm calling the Drift method I thought about maybe moving it out of it's own if statement and it worked.
I didn't realize that it stopped moving rather than getting stuck. It was picking one over the other and after changing that it finally worked. I'm not sure if my previous code would have worked but now I'm making it so that the kart would drift after turning into a certain angle. I still can't believe that I overlooked the fixedupdate again.
Comments
Post a Comment