1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.30 Bug Reporting thread
    Solutions and more information may already be available.

Ai way points + paths, REFUSE to follow direction even with correct flags.

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by krallopian, Feb 24, 2019.

  1. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    I'm trying to make two roads, both crossing each other, and separate ai paths, no luck.

    I've attached an image showing 3 (actually 4) scenarios I've tried, all of which aren't working:

    1.) Shows a tunnel (blue) that has two one-way lanes going through it (green) and one one-way lane (red) that joins in to share the tunnel. AI refuses to stick to course.

    2.) I've set things up using way points, wp1 -> wp 2 -> wp3 -> etc still ignores the red line and joins up on the green line instead.

    3.) Continous red line, with green lanes setup with way points, and still the car sticks to the green line.

    I've adjusted their drivabilities, I've got "one way" I've tried flip direction, nothing seems to make this work.


    I figured if I had, "stay in lane" on it would work but it doesn't in this case. So I've removed the two green lanes' way points for now, and just run the red lane straight through the tunnel, then it of course works, but as a result I have no green lanes anymore. If I have all three, the car always takes the green lanes (shortest distance) which I thought I could avoid with STAY IN LANE but no.

    So, I need to find out how to make the AI stick to ONLY it's specified way points and not pay attention to others.

    Two different paths occupying the same road, simply doesn't work in my case (again, because I'm trying to get the AI to take the LONGER route which it doesn't want to do.)

    Any ideas?
    --- Post updated ---
    Actually, I've attached a second image that's showing what's ACTUALLY happening - the AI gets to the tunnel and either tries to turn around right away, or gets to the other end, then turns around and even though "ONE WAY" is set in both the lua file for the way points:

    Code:
          "beachTunnelLane1" : {
            "nodes" : ["beachTunnel_L1_1","beachTunnel_L1_2"],
             "drivability" : 1,
            "oneWay": true,
            "flipDirection": false
    and the paths, the car still goes against it. I thought waypoints would overpower it, "wp1 can ONLY go to wp2" but it doesn't care and will still go back on itself to take the shorter route :'(
     

    Attached Files:

    • aiBrokenStill.jpg
    • aiBrokenStill2.jpg
  2. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    I had the idea of moving the waypoints slightly up or slightly down depending on where it is. It looks janky when turned on, but it seems to not create an autojunction. Just low enough where it doesn't intersect, but the AI can still read it.
     
    • Informative Informative x 1
  3. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    I tried that, and the result was that the AI still turned around when it saw the other points, because I need all the points to be there for the other lanes to remain working :(
     
  4. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    Pretty sure that worked for me. Maybe some screenshots of you trying that? If there's only three roads, so it should work with one road up, one road on ground level, one road down.
     
    • Informative Informative x 1
  5. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    The problem isn't that the roads intersect, it's that when the AI sees a point on the other road, it takes that one, regardless of whether or not it's raised! I used way points to avoid the intersections in the first place =)
     
  6. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    ...I think I understand...can you post a screenshot of what It looks like? I personally doubt that'll work, but I bet someone's smarter than me...
     
  7. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    I drew the picture, because a screenshot is too messy to make sense of and most of it is hidden by trees and rocks etc.. =)

    I also . . don't want to show what I'm working on yet ;)
     
    • Informative Informative x 1
  8. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    This is caused by, "autojunction" on the pathing. There is no option to disable that, and I've tried doing, "autojunction: false"
    --- Post updated ---
    Well well well, look what I've just come across haha!

    https://www.beamng.com/threads/how-to-make-the-ai-path-not-make-an-intersection-when-crossed.39605/

    Maybe just adding WAY MORE waypoints would fix this.. I dunno. The auto junctioning really breaks things up. I'm trying to cross FOUR lanes and what should be a nice straight lines just gets destroyed and the ai loses it's mind.
    --- Post updated ---
    ( I should say, it IS working, but...... it's very dirty and I'm sure there's a "disable autojunction" or SOMETHING for pathing!)
     
    • Informative Informative x 1
  9. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    I guess me from 2017 helped? lol. But I'm more than sure something works.
     
    • Like Like x 1
  10. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,683
    If I understood right, you want more paths intersecting, but want the AI to continue on the path.
    I'm not entirely sure, but I believe it's not possible as of now.
    Crossing paths will automatically create an intersection, and the AI can decide to change path from them.

    If you use a scenario tho, and specify the exact waypoint route for the AI, they will follow that.
    (see the 'Intersection' scenarios lua files, where we tell the AI which waypoints to drive through)
     
    • Informative Informative x 1
  11. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    Thanks for chiming in!

    I had figured it wasn't possible, but think it would be absolutely lovely to have a checkbox for, "Create Junction" for ai pathing, seems like something very useful! Also assumed making a SCENARIO was the best bet here, but for now I'm just commenting out waypoints in the LUA file. Waypoints ONLY would work, but it's the combining ai decal road paths and way points that breaks things due to the auto junctions.

    Thx!
    --- Post updated ---
    FWIW, I mentioned it IS working just it's tricky to MAKE it work because you have to place the road ways in a very specific way to avoid junctions. So there's that at least, but again it's a very dirty way of doing it.
     
  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