GetLevelFittedNO
ULodGlspComponent · API Reference
Calculates LOD from camera distance and the longest side of the Chunk.
cpp
int32 GetLevelFittedNO(float fDistance) const;The LOD becomes approximately one level coarser each time the distance ratio doubles. Returns INDEX_NONE when no valid LOD is available.
C++ Example
cpp
const float Distance = FVector::Distance(
CameraLocation, Chunk->GetComponentLocation());
const int32 Lod = Chunk->GetLevelFittedNO(Distance);Blueprint Example

See Also
- GetLevelFittedNormalizedDistance: uses the Chunk bounding-sphere radius and is better suited to differently sized Chunks.
- ChangeLevel: applies the calculated LOD.