Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into double-sided
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Aug 31, 2024
2 parents 238120c + 2bc60bf commit 5aef485
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions native~/Runtime/src/CesiumGeoreferenceImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ LocalHorizontalCoordinateSystem createCoordinateSystem(
DotNet::CesiumForUnity::CesiumGeoreferenceOriginPlacement::TrueOrigin) {
// In True Origin mode, we want a coordinate system that:
// 1. Is at the origin,
// 2. Converts from Y-up to Z-up, and
// 3. Uses the georeference's scale
// 2. Inverts Y to create a left-handed coordinate system,
// 3. Converts from Z-up to Y-up, and
// 4. Uses the georeference's scale
glm::dmat4 localToEcef(
glm::dvec4(scale, 0.0, 0.0, 0.0),
glm::dvec4(0.0, 0.0, scale, 0.0),
glm::dvec4(0.0, -scale, 0.0, 0.0),
glm::dvec4(0.0, scale, 0.0, 0.0),
glm::dvec4(0.0, 0.0, 0.0, 1.0));
return LocalHorizontalCoordinateSystem(localToEcef);
}
Expand Down

0 comments on commit 5aef485

Please sign in to comment.