17 lines
395 B
C#
17 lines
395 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace BITKit.OpenWorld
|
|
{
|
|
public class WorldTerrainService : WorldChunkService<WorldTerrainService>
|
|
{
|
|
protected override int CalculateLod(IWorldChunkObject value, Vector3 cameraPosition, int lod)
|
|
{
|
|
if (lod is not 0) return lod;
|
|
|
|
return value.GetBounds().Contains(cameraPosition) ? 0 : 1;
|
|
}
|
|
}
|
|
}
|