Render Chunk Regardless of Distance

beginner faq

Voxel Play 3 · Troubleshooting & FAQ

Voxel Play separates chunk generation from rendering so when you call:


VoxelChunk chunk = env.GetChunk (position, forceCreation: true);


It will generate the chunk at that position. However, it's not guaranteed that the chunk will be rendered unless it gets within the visible distance or camera frustum (parameters that can be configured in the Voxel Play Environment).


Now, let's assume that for any reason we want to generate a remote chunk but also want to render it (make it visible).


In this case, add ths following code to force its rendering:

chunk.ignoreFrustum = true;
env.ChunkCheckArea (position, Vector3.zero, renderChunks: true);