Previous Post:
My Turn Based, Card Based, Deck Building Racing Game – Post 1
I don’t have a whole lot to show off in this build, but I had a funny bug that I wanted to show off, and I figured it would be a good time to post an update on the game. But first, the bug.
While this bug is really funny, it brings up an underlying problem that I haven’t been able to fix. I’m using NavMeshAgents to move all of my cars, and, to my understanding, the cars should automatically rotate based on what they’re under. This could be wrong, but a friend of mine is also using NavMeshAgents for movement and his characters rotate just fine. This doesn’t happen in my game. Because of this, I have to automatically rotate the cars based on what slope they are under. Now, you might be wondering why this is a problem. After all, in the last post, everything worked fine. Well, it turns out it didn’t work fine, and now the cars get completely messed up and I’ve completely borked the code. So, using a mix of NavMesh raycasts and physics raycasts, I made a point in front of the player snap to the NavMesh and forced the car to constantly look at it. Besides that, there are a few new, and important, things added. Here’s a video of the updated game in action with written bullets underneath.
- Movement through A and D.
- This is done by having an empty GameObject 3 local units in front of the car and rotating it around. Upon letting the A or D key up, the GameObject returns back to its original position
- Speed control through W and S.
- Car color specific trails
- A fixed rotation system
- Made a rough Timeline animation showing off the track before the race starts
- Added a Cinemachine camera as the main camera to give it more leeway and make it feel better
- Improved the AI controls to make them more fluid and less likely to crash and break
Next post: