protected ChunkRenderableBase CreateChunkRenderer(Chunk chunk, Vector3 position, Quaternion rotation) { ChunkRenderableBase r = (ChunkRenderableBase)System.Activator.CreateInstance(globalSettings.renderSetup.renderableClass); r.Init(this, chunk); // Forced geometry generation chunk.dirty = true; return(r); }
protected override bool ShouldDisappear(ChunkRenderableBase r) { return((new Vector2(follows.position.x, follows.position.z) - new Vector2(r.position.x, r.position.z)).magnitude > (disappearDistance) || r.position.y > (worldHeight * 32.0f)); }
protected virtual bool ShouldDisappear(ChunkRenderableBase r) { return((new Vector3(follows.position.x, follows.position.y, follows.position.z) - r.position).magnitude > (showDistance)); }