i think that a anti collision warning systems for newer cars should be in beam ng drive.

Discussion in 'Ideas and Suggestions' started by dsarraino, Dec 17, 2020.

  1. dsarraino

    dsarraino
    Expand Collapse

    Joined:
    Nov 23, 2020
    Messages:
    81
    i think the newer cars in beam ng drive should have anti collision warning systems. i think it would add more emersion into the game and be more realistic.
     
    • Agree Agree x 1
  2. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    585
    It looks like its actually possible to implement this with not much fuss since there is a raycasting function:
    Code:
    --Returns distance to the nearest collision box
    --If no object hit, it returns "distance" parameter
    castRayStatic(Point3F rayStart, Point3F rayDir, float distance)
    
    So you can pair this with some physics kinematic equations to figure out when the car should brake and I might even try making since this would be cool to have, if no one else is gonna make it.
     
    • Agree Agree x 2
  3. dsarraino

    dsarraino
    Expand Collapse

    Joined:
    Nov 23, 2020
    Messages:
    81
     
  4. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    585
    I made some progress on this but I ended up using a different raycasting function, due to limitations with the former one.
    Code:
    --Function only avaliable from GameEngine Lua
    --Returns closest object in path of ray and gives info such as distance to object, normal vector of object's face hit, vec3 position hit, and object's data
    function castRay(vec3 origin, vec3 target, boolean includeTerrain, boolean renderGeometry)
    And so it took a bit more time than expected to get a working prototype. Anyways, here's a little demonstration of it working! :)
     
    #4 angelo234, Dec 28, 2020
    Last edited: Dec 28, 2020
    • Like Like x 10
  5. P_enta

    P_enta
    Expand Collapse

    Joined:
    Jan 11, 2020
    Messages:
    3,029
    woah i was thinking about a more rudamentary funciton of doing it, by just having some nodes out in front of the car that wont get damaged, and you just detect when one has been hit and slow the car down. this is much nicer. You could implement parking sensors with this as well with some simple lua.
     
    • Agree Agree x 3
    • Like Like x 1
  6. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    585
    Thanks! Although the downside of this is that if I want to detect smaller objects, I will have to cast a bunch of rays to mimic a radar system which may cause quite a bit of lag! I'm gonna also add a UI app that will be used to warn you when you are getting close to an obstacle. Parking sensors sounds like a good idea to add as well and visualizing it with a UI app, although I'm quite newbie with HTML :(.
     
    • Agree Agree x 1
  7. P_enta

    P_enta
    Expand Collapse

    Joined:
    Jan 11, 2020
    Messages:
    3,029
    Beeping would be nice too. Just a simple .ogg you play realistically at the different levels of closeness. (If that makes any sense.)
     
    • Agree Agree x 2
  8. dsarraino

    dsarraino
    Expand Collapse

    Joined:
    Nov 23, 2020
    Messages:
    81
    i love the prototype and i think it's beautiful.

    i think the beam ng drive team should hire modders to the team.
     
    • Like Like x 1
  9. SKB

    SKB
    Expand Collapse

    Joined:
    Apr 22, 2017
    Messages:
    1,960
    Woah this is just as interesting as airbags. Maybe this system combined with the parking sensors could be added to the html stuff of the cars in-game screens, which could be made to be like in the raven r20 car, which has useable screens etc. This is amazing!
     
  10. dsarraino

    dsarraino
    Expand Collapse

    Joined:
    Nov 23, 2020
    Messages:
    81
    thank you! i 100% agree
     
  11. IbishuFanBoy

    IbishuFanBoy
    Expand Collapse
    Banned

    Joined:
    Jan 6, 2021
    Messages:
    80
    This is so cool. The devs should definitely add this feature and airbags feature and there should be an option to turn it off. They should look into mod creators like the guy who created the ETK S Series and the ETK 1300 Series.
     
  12. SKB

    SKB
    Expand Collapse

    Joined:
    Apr 22, 2017
    Messages:
    1,960
    Speaking of, I wonder if the ETK S series would still work.. probably not.. I miss having a German luxury sedan in game.. we've got the German wagons and coupés.. Etk800 and K series, the older ETK 2400 series.. is there gonna be a luxury sedan coming soon? Any ideas?
    --- Post updated ---
    Plus, this needs staff pick.
     
  13. IbishuFanBoy

    IbishuFanBoy
    Expand Collapse
    Banned

    Joined:
    Jan 6, 2021
    Messages:
    80
    Well you're in luck, just search ETK S Series and click the subscribe button to download, it will say a message that if you click yes you will be directed to Beamng. Click yes and voila it's there. Hoped this helps. By the way this mod works fine. No bugs, except one with the gauges, it has been there even before the mod went outdated.
     
  14. SKB

    SKB
    Expand Collapse

    Joined:
    Apr 22, 2017
    Messages:
    1,960
    I guess the gauges are on an outdated html or stuff, I'm not sure how it works, but maybe a drivetrain swap fron the ETK 800 and a bit of tweaking like the engine sounds, interior sound deadening, air/adaptive suspension maybe, and it would be like new I guess.. I think the jbeam is uh, fine??, on it?
     
  15. IbishuFanBoy

    IbishuFanBoy
    Expand Collapse
    Banned

    Joined:
    Jan 6, 2021
    Messages:
    80
    Yes, I think the jbeam is fine. Unfortunately the mod creator NinetyNine I think gave up on making mods and there will most likely never be another update to this mod unless he comes back.
     
  16. Sithhy™

    Sithhy™
    Expand Collapse

    Joined:
    Apr 5, 2017
    Messages:
    3,366
    As far as I'm aware, NinetyNine is a staff member, so he obviously doesn't have time anymore
     
    • Agree Agree x 2
  17. angelo234

    angelo234
    Expand Collapse
    Programmer
    BeamNG Team

    Joined:
    Aug 11, 2017
    Messages:
    585
    • Like Like x 1
  18. SKB

    SKB
    Expand Collapse

    Joined:
    Apr 22, 2017
    Messages:
    1,960
  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