orbitusii / loki-bms-csharp

Battle Management Scope for DCS World (and maybe others?), this time in C#!
MIT License
2 stars 0 forks source link

Geometry - Some geometry appears massively distorted #29

Closed orbitusii closed 2 months ago

orbitusii commented 1 year ago

image KML files generated in Google Earth Pro, particularly those created from measure lines, appear massively distorted on import.

I suspect this has to do with the fact that the Scope Camera's TangentMatrix is generated at the center of the earth rather than at its surface, leading to the path being wrong when displayed. The altitudes in the delinquent KML file are all small, which would cause issues if the camera matrix is generated on the surface of the unit sphere and not earth.

This might require a significant refactor of the rendering code (from what I remember from trying to solve this early on) so I'll have to spend some time on this.

Workaround

Fix the KML file in Google Earth Pro by opening its "Properties" page, then going to the altitude tab. image Change its altitude mode from "Clamped to ground" to "Altitude" and set the altitude field to zero, removing anything inside of it. image The geometry should then behave correctly