Unsolved Specifying lane count for both-way Waypoint-based AI roads

Discussion in 'Mod Support' started by EvilMcSheep, Mar 11, 2022.

  1. EvilMcSheep

    EvilMcSheep
    Expand Collapse

    Joined:
    Jan 5, 2016
    Messages:
    130
    Good morning!
    I've been trying to help a friend with a map port from an old racing game (Street Legal Racing: Redline);
    Specifically, the AI paths!

    I'm using a script to automatically convert data straight from the SLRR game files to BeamNGWaypoints, covering the entire map (~62km of road, with 271 intersections, currently resulting in 8784 Waypoints placed :D).

    Problem is: For roads lacking the "oneWay" parameter (almost every road in this case), the "lanesLeft" and "lanesRight" params seem to do nothing!
    Therefore, (undisturbed) AI traffic likes to stick to the center of their side of the road, except for when taking turns in intersections.

    20220311184207_1.jpg

    Waypoints are defined like this:
    Code:
    {"name":"R1106_1","class":"BeamNGWaypoint","__parent":"AI","position":[-592.447144,590.722473,52.934737],"scale":[7.000000,7.000000,7.000000]}
    Roads are defined like this:
    Code:
    "R1106-C97" :
    {
        "nodes" : ["C255", "R1106_1", "R1106_2", "R1106_3", "R1106_4", "R1106_5", "R1106_6", "R1106_7", "C97"],
        "drivability" : 1,
        "lanesLeft" : 2,
        "lanesRight" : 2
    },
    (2 lane-per-direction road there, as seen in pic above. "C"-nodes are of Crosses, with each road starting and ending with a Cross)
    (Lanes are 3.5m wide, and Waypoints are scaled according to lane count, with Cross Waypoints assuming the scale of the widest connected road)
    (The Waypoint density is very high for the sake of tightly curved roads being taken correctly, and it could be optimized a lot, but I figure that it's not a problem for a proof-of-concept :))

    Is there something wrong with how it's done here? Surely defining each direction as it's own road isn't the correct way to do this, right?

    EDIT: Well, this thread is dead...
    Reposted as a bug report here: https://www.beamng.com/threads/lane-count-parameters-dont-work-for-non-oneway-waypoints.85737/
     

    Attached Files:

    #1 EvilMcSheep, Mar 11, 2022
    Last edited: Apr 17, 2022
  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