GetLevelFittedNormalizedDistance
ULodGlspComponent · API Reference
Calculates LOD from the normalized distance between the camera and the Chunk.
cpp
int32 GetLevelFittedNormalizedDistance(
float fDistance) const;Normalized distance is distance / Chunk bounding-sphere radius, with LodDistanceScale applied. Each distance doubling makes the LOD one level coarser; adjacent thresholds use 10% hysteresis.
C++ Example
cpp
const float Distance = FVector::Distance(
CameraLocation, Chunk->GetComponentLocation());
const int32 Lod =
Chunk->GetLevelFittedNormalizedDistance(Distance);Blueprint Example

See Also
- GetLevelFittedNO: alternative distance calculation based on the longest Chunk side.
- ChangeLevel: applies the calculated LOD.