Make AI Vehicles Respawn at a Certain Speed?

Discussion in 'Ideas and Suggestions' started by Allots, Dec 1, 2021.

  1. Allots

    Allots
    Expand Collapse

    Joined:
    Mar 16, 2021
    Messages:
    195
    I'm not sure if this is possible or if this has been asked before, but I was wondering if there could be a way for AI vehicles to respawn at a certain speed (possibly the speed that they were in before respawning) instead of respawning, being back at 0 mph/kmh, and having to accelerate.

    I'm pretty sure American Truck Simulator (not saying ATS and BeamNG are really similar) does this where once the AI exits the proximity of the player, it respawns however at whatever speed is appropriate (e.g. if an AI respawned on a highway, it would respawn at the speed limit, or if an AI respawned approaching a red light, it would respawn at a significantly lower speed). This allows for traffic to feel smoother and not seem congested.

    When cars in BeamNG respawn, they always have to accelerate in order to reach a speed they were previously at again, which just feels unrealistic because normally cars don't just stop and accelerate in real life unless there was an emergency or traffic jam. It also just feels weird to hear every car accelerating when I'm idle.
     
    • Agree Agree x 8
  2. Drivesafe4

    Drivesafe4
    Expand Collapse

    Joined:
    Dec 28, 2020
    Messages:
    33
    Surprised this still isn't a feature.
     
  3. Unster

    Unster
    Expand Collapse

    Joined:
    Jan 23, 2018
    Messages:
    370
    I agree. Seeing it is actually what bothers me. Hearing it is secondary. I think the AI should also spawn farther away from the camera.
     
  4. Gamergull

    Gamergull
    Expand Collapse
    BeamNG Team

    Joined:
    Jun 3, 2018
    Messages:
    351
    This is currently a limitation of the physics engine. When a vehicle gets "soft-reset", if its rotation is different than its old rotation, it will always start fresh, with zero speed. For many roads, the traffic vehicle's rotation will be different than what it used to be, so this is expected behavior. Also, because BeamNG's vehicles aren't just "boxes with wheels" like other games, it's not so easy to just instantly set their physical properties. I'll mention this to the game engine & physics leads, because it would be great if there was a possible solution.

    There is another part to this problem. Vehicle speed can be kept if the old and new rotations are the same, but I was running into problems where vehicles that were driving at highway speeds would teleport to a parallel road and miss curves or crash. This is solvable, but low on the priority list.
     
    • Like Like x 6
  5. Allots

    Allots
    Expand Collapse

    Joined:
    Mar 16, 2021
    Messages:
    195
    I see, this makes more sense now
     
  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