godot_voxel/doc/source/api/VoxelViewer.md

39 lines
1.7 KiB
Markdown
Raw Normal View History

# VoxelViewer
Inherits: [Spatial](https://docs.godotengine.org/en/stable/classes/class_spatial.html)
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](VoxelViewer.md) 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` | [requires_collisions](#i_requires_collisions) | false
`bool` | [requires_visuals](#i_requires_visuals) | true
`int` | [view_distance](#i_view_distance) | 128
<p></p>
## Property Descriptions
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_requires_collisions"></span> **requires_collisions** = false
2021-02-16 20:54:45 +00:00
If set to `true`, the engine will generate classic collision shapes around this viewer.
- [bool](https://docs.godotengine.org/en/stable/classes/class_bool.html)<span id="i_requires_visuals"></span> **requires_visuals** = true
2021-02-16 20:54:45 +00:00
If set to `true`, the engine will generate meshes around this viewer. This may be enabled for the local player.
- [int](https://docs.godotengine.org/en/stable/classes/class_int.html)<span id="i_view_distance"></span> **view_distance** = 128
2021-02-16 20:54:45 +00:00
How far should voxels generate around this viewer.
2021-05-31 17:23:29 +01:00
_Generated on May 31, 2021_