Using geodetic coordinates (WGS84) in Bevy #9783
Replies: 2 comments 3 replies
-
I've done a little GIS work outside of Bevy. In my opinion, you would want to pre-process your assets out of WGS84 and into Bevy's coordinate system, either at startup or compile time. Of course, that depends on the types of assets you're working with. If you're streaming in GIS information from something like ArcGIS during gameplay, then obviously this would have to happen at runtime. As for how to do that mapping most efficiently, I would keep it simple and define a |
Beta Was this translation helpful? Give feedback.
-
Seems like @alice-i-cecile have mentionned GIS integration with bevy here #1678 (comment) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
As a hobby project, I would like to try developing some kind of train driving simulator with bevy.
All the position of the tracks and scenery (buildings, vegetation, ...) would be in geodetic coordinates using WGS84. Also, this is the way the already available data exists (OSM, train companies open data, ...). But to display it with the GPU we need it to work in xyz coordinates.
I know that there are formulas for this, but how could I do it efficiently? Also, I don't want to have to recompute everything for each frame, but how can it work if the camera moves every frame ? Because generally this type of conversion has less and less precision as you move further from the origin you chose, and in this type of game you're supposed to move in dozens of km. The place where precision matters is actually close to the camera (wherever this camera is).
Flight simulators have a similar problem to solve, but I couldn't really figure out how it works when I've tried to look at the FlightGear code (open-source flight simulator).
Beta Was this translation helpful? Give feedback.
All reactions