How to ensure a chunk is rendered regardless of distance to camera?

Modified on Mon, 15 Mar 2021 at 06:21 PM

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);



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article