VoxelViewer

Inherits: Node3D

Attach this as a child node of characters, so the voxel world will know where to load blocks around them.

If no viewer is present in the world, nothing will generate.

Description:

The voxel world uses the position and options of all the VoxelViewer nodes to determine where to load blocks, and prioritize updates. For example, a voxel placed 100 units away from a player will have much lower priority than the modifications that player is doing when digging in front of them.

Properties:

Type Name Default
bool enabled_in_editor false
bool requires_collisions true
bool requires_data_block_notifications false
bool requires_visuals true
int view_distance 128
float view_distance_vertical_ratio 1.0

Methods:

Return Signature
int get_network_peer_id ( ) const
void set_network_peer_id ( int id )

Property Descriptions

bool enabled_in_editor = false

Sets whether this viewer will cause loading to occur in the editor. This is mainly intented for testing purposes.

Note that streaming in editor can also be turned off on terrains.

bool requires_collisions = true

If set to true, the engine will generate classic collision shapes around this viewer.

bool requires_data_block_notifications = false

(This property has no documentation)

bool requires_visuals = true

If set to true, the engine will generate meshes around this viewer. This may be enabled for the local player.

int view_distance = 128

How far should voxels generate around this viewer.

Note: the effective view distance may be limited by the terrain node.

Note 2: when using VoxelLodTerrain, this distance essentially acts as a limit to how far the last LOD extends.

float view_distance_vertical_ratio = 1.0

Modifies vertical view distance to be a ratio of the view_distance property. For example, if view_distance is 100 and this property is 0.5, then horizontal view distance will be 100 and vertical view distance will be 50.

This property has limitations: it is only implemented on VoxelLodTerrain when using VoxelLodTerrain.STREAMING_SYSTEM_CLIPBOX, and applies only to the last LOD, like view distance.

Method Descriptions

int get_network_peer_id( )

(This method has no documentation)

void set_network_peer_id( int id )

(This method has no documentation)

Generated on Jan 26, 2026