AI Racing with Recovering

Discussion in 'Programming' started by frieder_marek, May 25, 2025.

  1. frieder_marek

    frieder_marek
    Expand Collapse

    Joined:
    Feb 25, 2024
    Messages:
    4
    Hello everyone,
    I spend my main time in BeamNG.drive with experimenting with setting up and spectating AI races. I'd also like those cars to recover, when they're stuck on the track.
    - Is there a way to track the progress of the AI vehicles on the calculated path?
    - And is there a way to recover the vehicle based on the path it needs to follow?
     
  2. THEARTH

    THEARTH
    Expand Collapse

    Joined:
    Jul 7, 2020
    Messages:
    48
    not sure if this helps, but maybe you could use the flowgraph to reset vehicles?
     
  3. frieder_marek

    frieder_marek
    Expand Collapse

    Joined:
    Feb 25, 2024
    Messages:
    4
    Hello there!
    I've taken a look at the flowgraph editor. Flowgraph is great to create missions and integrate them into the BeamNG maps. But I don't want to create a classical "mission" to play for other players; my goal is to have a function, UI app or something similar to quickly set up AI races to spectate. So I can spontaneously set up a route for all vehicles spawned in the scene (including the player vehicle) to race along. And if a vehicle gets stuck, it should recover and continue along its route instead of starting all over from the first node of the list.
    In other words: When I reset a broken vehicle using Recover, Reset, Load Home, recovery.recoverInPlace() or ai.setRecoverOnCrash(true) the path progress, as well as the number of laps already passed, gets lost. So I have to manually bring the car back into the race - starting it all over again instead of continuing the route it's been on.
    And if 10 or more vehicles are involved within the race, I spend more time resetting vehicles and estimating their progress than spectating them...
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice