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.35 Bug Reporting thread
    Solutions and more information may already be available.

In-game, real time GPS coordinates

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Gunslinger711, Mar 8, 2025.

  1. Gunslinger711

    Gunslinger711
    Expand Collapse

    Joined:
    Mar 4, 2025
    Messages:
    19
    Reading over the documentation here: https://documentation.beamng.com/beamng_tech/sensors/gps/ and not seeing any mods that seem to provide what I'm asking for, I figured I'd ask here.

    I'm looking for a way to do it myself or add it into my map if it already exists. There's a lot of "GPS" UI mods out there but none that provide coordinates (Lat, Long) or where the player is on the map.

    Does this exist? If not, how hard would it be to implement? Is it as easy sounding as placing one GPS sensor in the middle or a corner of your map and setting that to 0,0 then placing another sensor (somehow) on whatever vehicle the player chooses and then somehow setting that to update it's position relevant to the first sensor?

    Any help is appreciated.
    --- Post updated ---
    Looks like this is only available in Beamng.Tech and not Beamng.Drive which answers that part. So my next question would be, how do I mark spots on the map to travel to? Would every spot I mark need to be marked in the world editor?
     
    • Like Like x 1
  2. Gunslinger711

    Gunslinger711
    Expand Collapse

    Joined:
    Mar 4, 2025
    Messages:
    19
    Using this as a space to record my research as it seems like this is possible in the game and I'm not sure if I'm not searching correctly or it's no one has currently implemented it.

    To clarify, there's maps I've downloaded I've found cool spots/trails I'd like to share with other people. Right now there's no way to do this. I can't say "Load up Map X, turn on your in-game GPS, punch in coordinates Y,Z and check out this interesting feature I've found." Or "I charted a cool trail on Map X, turn on your in-game GPS, punch in these waypoints: Y1,Z1 | Y2, Z2 | Y3, Z3 to run that same trail."

    Research:

    Here's someone discussing how to get a cars location on the map from LUA: https://www.beamng.com/threads/about-the-location-of-the-cars.96399/

    Here's a thread that mentions the location/position- x,y,z which definitively let's me know there's coordinates that can be referenced: https://www.beamng.com/threads/ques...-vehicle-on-one-of-the-race-track-maps.96236/

    This is the thread I found most promising based on the quote from @Agent_Y "No idea if it will help but have you tried to find out how it's done in the in-game GPS system? It knows the position and rotation of the vehicle so it could help" : https://www.beamng.com/threads/finding-a-world-coordinate-relative-to-a-vehicles-location.75920/

    Based on that quote alone it seems like it would be possible to create a Mod UI element that displays the real time location of the player's vehicle in coordinate form.

    Any help is appreciated.
     
    • Like Like x 1
  3. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    651
    It would be quite easy to make a litte UI app that shows the player coordinates (with the map as reference system). Unfortunately I have no time do make it right now, allthough I wanted to integrate such an option into my app mod (Barbent's Clockwork).
    But I can provide a good workaround, especially if you want to share locations on a specific map with friends:
    1. Drive to the location you like.
    2. Open the World Editor [F11]
    3. Select your current car (or vehicle) in the Sceene Tree (it is called "thePlayer") or directly in the render window.
    4. Right click on the Position data field in the Inspector pane.
    5. Select "Copy Value".
    6. Now you have a text string on your operating system's clipboard, which can then be pasted into any message you like to send (e.g. an e-mail or a forum post).
    7. Your friend can now copy the string and select his vehicle like described above and paste the information into his data field, also with the right click menu "Paste Value".
    upload_2025-3-18_0-50-40.png

    This is a example string for a position on the "Automation Testtrack" map I copied:
    {"copiedFieldType":"MatrixPosition","copiedValue":"-346.814758 186.056244 130.555374"}

    You could now copy the complete line above (including the {} backets) and paste it to your car's position and this way jump to the same position I was.

    Hope that helps :).
     
    #3 Barbent Servo GT, Mar 18, 2025
    Last edited: Mar 18, 2025
    • Like Like x 1
    • Agree Agree x 1
  4. Gunslinger711

    Gunslinger711
    Expand Collapse

    Joined:
    Mar 4, 2025
    Messages:
    19
    Thanks so much for the work around @Barbent Servo GT ! I recognized the name from your excellent map Barbent's Gambling Zone. Some very fun off road sections there.

    Programmatically it does seem like it would be easy to implement in a UI mod. With as many off road folks I see using Beam to rock crawl/bounce I'm surprised no one has modded up to record trail coordinates and share them.
     
    • Like Like x 1
    • Agree Agree x 1
  5. Oscar Bower

    Oscar Bower
    Expand Collapse

    Joined:
    Mar 30, 2025
    Messages:
    1
    @Barbent Servo GT & @Gunslinger711
    I’ve been looking for a way to obtain realtime GPS-coordinates/positional data while driving a car in BeamNG for an academic project and it seems like you two have come quite close to this. Programmatically it would seem that you would have to write a code that that copies the cars positional data from the Positional data field in the inspector pane. This copying would have to happen in realtime, about 10 times a second maybe. Perhaps a code for this already exists and I just haven’t been able to find it.
    Any input would be greatly appreciated, thanks in advance:)
     
  6. Barbent Servo GT

    Barbent Servo GT
    Expand Collapse

    Joined:
    Jun 4, 2023
    Messages:
    651
    Hi "Oscar Bower"!
    Basically, I would try to handle the whole thing via an app*. From this side, it is possible to access data streams provided by the vehicle. For example, the entire electrical system of a BeamNG vehicle (e.g., the status of the left turn signal) is displayed as a data stream. You register as an app that you want to read a specific data stream, and then you can read it continuously. If the app is closed, you have to log out of this data stream.
    There is an old but still informative article here.

    For the vehicle's position, you would have to read the values "position.x", "position.y", and "position.z" from the "sensors" data stream. Displaying these values or writing them to the hard drive is both possible. I haven't tested myself yet whether this particular xyz data is available in a "healthy" way. I know for other data; see my little app.

    The other option would be to access the Scene Tree and the vehicle as an object (like I manually did in my workaround above). But I don't know how to achieve that from app side, and I doubt this data is continuously updated. It would probably be rather unusual to do it that way.

    It also depends on whether you need very precise ticking timing or whether a timestamp is desired, but that is the more general part of the programming. The (Java Script) code found in the above-mentioned article can be used as a starting point for an app that continuously reads data streams from the vehicle.

    It's just a matter of time before I integrate it into my app, because I'd like to have a feature like that too ;).

    * "Apps" in BeamNG are those overlay UI elements like the speedo or the damage display.

    I hope this helps you a bit :) + good luck for your academic project :cool:.
     
  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