Car AI handling Nitro, Brakes etc

I am writing some car ai and was wondering how people here would handle the car ai needing to use nitro or using the handbreak to drift etc?

I am not too sure how I want to lay those parts out. The player and ai use the nitro the same way the only thing different would be the way they “invoke” said systems via their means.

Im sure they are using raycast to check when to use nitro( checks if the road is empty or check near cars ). Also it can be checking if the road is straight from the map. It can depend when it should use if its a mission or not

1 Like