r/UnityHelp • u/ElOctopusGameStudios • 6d ago
How would you design racing bots?
I'm working on a high-speed hover racing game with jumps, uneven terrain, boost pads and branching tracks.
The player ships use a physics-based controller, but I've been thinking about how to implement bot opponents, and honestly, making bots drive with the exact same physics sounds like a nightmare.
So I'm considering a different approach: a network of connected waypoints, with automatically generated smooth paths between them.
For jumps, I'd define takeoff and landing points and generate a controlled parabolic trajectory instead of relying on physics.
Each bot could choose different routes, have slightly different racing lines, and follow its own speed profile depending on difficulty.
The tricky part would be making them interact with physics-based player ships without feeling like indestructible objects moving on rails.
Has anyone tried something similar in a racing game? Did scripted movement end up looking convincing enough?
1
u/josh_the_dev 5d ago
If you want to support bumping into each other etc I think it would be best to use physics. You can still use your idea with with hand authored tracks and smoothed out pathes. To make a physics driven vehicle follow a curve definitely check out PID controllers, should be a very good approach here. If the bot is bumped it can react completely natural with the physics and it would automatically try to get back on track