Skip to content

Commit

Permalink
Merge pull request #474 from CesiumGS/howls-moving-tiles
Browse files Browse the repository at this point in the history
Fix moving tiles on origin shift by setting last ellipsoid when setting last locals.
  • Loading branch information
kring authored Jul 1, 2024
2 parents 2ce1da8 + b41121d commit 0e49fa3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Runtime/CesiumGlobeAnchor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,6 @@ public void Sync()
this._lastLocalScale != this.transform.localScale;
}

_lastEllipsoidRadii = _georeference.ellipsoid.radii;

if (isEllipsoidChanged || updateFromTransform)
this.UpdateEcefFromTransform();
else
Expand Down
1 change: 1 addition & 0 deletions Runtime/ConfigureReinterop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ Cesium3DTilesetLoadFailureDetails tilesetDetails
globeAnchor._lastLocalPosition = new Vector3();
globeAnchor._lastLocalRotation = new Quaternion();
globeAnchor._lastLocalScale = new Vector3();
globeAnchor._lastEllipsoidRadii = new double3();
globeAnchor.UpdateGeoreferenceIfNecessary();

CesiumTileExcluder[] excluders = go.GetComponentsInParent<CesiumTileExcluder>();
Expand Down
1 change: 1 addition & 0 deletions native~/Runtime/src/CesiumGlobeAnchorImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ void updateAnchorFromCpp(
anchor._lastLocalRotation(transform.localRotation());
anchor._lastLocalScale(transform.localScale());
anchor._lastLocalsAreValid(true);
anchor._lastEllipsoidRadii(georeference.ellipsoid().radii());
}
}

Expand Down

0 comments on commit 0e49fa3

Please sign in to comment.