I’m running Unity 2021.3.37f1, and I’m working with the karting microgame. I didn’t realize the tutorials outside of the editor were written for version 2019.3 when I created the project, so that’s why my version is newer than the tutorial’s recommended version.
I’ve done the tutorial to change the player’s kart, and add a smart kart. I have the AI checkpoints working when the track is a plain loop, but as soon as I put my ramp in, the smart kart decides it’s going to jump off the track in an attempt to get to the next checkpoint that it can see (the checkpoint perpendicular to the ramp’s location on the other side of the track. Once it’s stuck in the middle, it keeps driving around the walls of the track, trying to follow the checkpoints. I’ve been trying to search online and just mess around with things on my own, but I haven’t figured out how to make the smart kart realize there’s a checkpoint behind the ramp; I’ve even put checkpoints onto the ramp to attempt to guide it to no avail.
The track layout, circuit goes counter-clockwise. Green lines are the AI checkpoints. The small pink ramps behind the big ramp are my “rescue ramps” for when I inevitably fall off the track.
And the smart kart going off the track as soon as it hits the ramp.
If there’s any other screenshots I can provide that’d help I’ll gladly share them. I’m going to keep working on the microgame without the ramp for now, but I’d love to put it back in if I can make the smart kart handle properly over it.
Try placing the checkpoint after the ramp closer to the ground, ensuring it’s not directly visible from the starting point of the ramp. This should force the AI to follow the track to reach it.
If your AI uses raycasting to identify checkpoints, consider temporarily disabling raycasting on the ramp section. This will prevent the AI from seeing the far checkpoint and force it to rely on the checkpoints along the track.