Conversation
… that has a GlobeAnchor
…ctionality moved to CesiumGlobeAnchorComponent
j9liu
left a comment
There was a problem hiding this comment.
Thanks @david-lively for the PR! Excited to see this feature come to life.
There are some design choices I would iterate on, so I left some basic feedback for that. I'm happy to do a deeper dive once the design solidifies.
…oid to maintain existing expected behavior.
…ff. Added comments. Extracted heightAboveTileset code to a function. Set initial fixed height when component is registered. Fixed comments.
…dded EditCondition to HeightReference property.
…or to maintain value when changing HeightReference value.
…et when appropriate. Lots of cleanup.
…Reference parameters, reverted change to a test.
j9liu
left a comment
There was a problem hiding this comment.
Thanks @david-lively! This is looking a lot better. There's still a few things that need to be addressed (beyond comment/style cleanup) but I think the implementation seems solid. 😎
| Category = "Cesium", | ||
| Meta = (ReturnDisplayName = "Height")) | ||
| double GetHeight() const { return this->GetLongitudeLatitudeHeight().Z; } | ||
| double GetHeight(const bool IgnoreHeightReference = true) const; |
There was a problem hiding this comment.
See my comment under GetLongitudeLatitudeHeight
| Meta = (ReturnDisplayName = "LongitudeLatitudeHeight")) | ||
| FVector GetLongitudeLatitudeHeight() const; | ||
| FVector | ||
| GetLongitudeLatitudeHeight(const bool IgnoreHeightReference = false) const; |
There was a problem hiding this comment.
Hm, almost wonder if you need a None option and call this parameter HeightReferenceOverride. Or Use Existing Reference or something. Would need to namesmith.
…ferenceTileset values. This makes sure the actor maintains its position when changing those values.
Co-authored-by: Janine Liu <32226860+j9liu@users.noreply.github.com>
Co-authored-by: Janine Liu <32226860+j9liu@users.noreply.github.com>
Co-authored-by: Janine Liu <32226860+j9liu@users.noreply.github.com>
…-to-terrain' into fix-height-relative-to-terrain
…or widgets when modifying HeightReference
… readonly status can be correctly updated
j9liu
left a comment
There was a problem hiding this comment.
Thanks @david-lively, this is looking really close!! I confirmed that you were able to fix the few UI bugs I noticed.
I still have one concern re: the OverrideHeightReference boolean in the Blueprints functions, but I don't think it will be a huge lift to address. Happy to talk about alternative solutions too.
…set(). Added ECesiumHeightReference::None to indicate allow clear overriding of the HeightReference value where needed.
j9liu
left a comment
There was a problem hiding this comment.
Looking better @david-lively ! My suggestions are only about comments, that's it.
There was a problem hiding this comment.
| * and height relative to the specified height reference. |
Description
When an object is moving, or the camera moves resulting in tileset LOD changes, objects may float above or sink below the terrain. This PR adjusts the actual height as needed to maintain the given distance to the tileset. Properties to control this are added to
UCesiumGlobeAnchorComponent.HeightReferenceis an enum indicating whether the height of the actor is fixed relative to the tileset or to the ellipsoid.ECesiumHeightReferenceMode::Ellipsoidis identical to the behavior before this PR; no height adjustment will be made.HeightReferenceTilesetspecifies anACesium3DTilesetactor, relative to whichHeightwill be interpreted whenHeightReferenceisECesiumHeightReferenceMode::Tileset. IfHeightReferenceTilesetisnullptr, no adjustments will be made.TilesetHeightUpdateIntervalhow frequently, inTickComponent()calls, for the height to be checked and the actor moved. A value of1indicates that this will happen on every call. A value of2indicates every second call, and so forth.clamp-to-ground.mov
Issue number or link
#1472
Author checklist
- [ ] I have submitted a Contributor License Agreement (only needed once).CHANGES.mdwith a short summary of my change (for user-facing changes).- [ ] I have added or updated unit tests to ensure consistent code coverage as necessary.- [ ] I have updated the documentation as necessary.Testing plan
MobilitytoMovable.CesiumGlobeAnchorcomponent.Height Referencevalue toTileset.HeightReferenceTilesetvalue toCesiumWorldTerrainor anotherACesium3DTilesetactor.It might be easier to set these fields on Dynamic Pawn's
CesiumGlobeAnchor, and fly over some terrain while observing that the pawn will remain a fixed height above the tileset.