godot_voxel/doc/docs/api/VoxelTool.md
Marc Gilleron ce198c2670 Some doc
2021-01-21 20:04:53 +00:00

11 KiB

VoxelTool

Inherits: Reference

Helper class to easily access and modify voxels

Properties:

Type Name Default
int channel 0
int eraser_value 0
int mode 0
int value 0

Methods:

Return Signature
void do_box ( Vector3 begin, Vector3 end )
void do_point ( Vector3 pos )
void do_sphere ( Vector3 center, float radius )
int get_voxel ( Vector3 pos )
float get_voxel_f ( Vector3 pos )
Variant get_voxel_metadata ( Vector3 pos )
bool is_area_editable ( AABB box )
void paste ( Vector3 dst_pos, Reference src_buffer, int src_mask_value )
VoxelRaycastResult raycast ( Vector3 origin, Vector3 direction, float max_distance=10.0, int collision_mask=4294967295 )
void set_voxel ( Vector3 pos, int v )
void set_voxel_f ( Vector3 pos, float v )
void set_voxel_metadata ( Vector3 pos, Variant meta )

Enumerations:

enum Mode:

  • MODE_ADD = 0
  • MODE_REMOVE = 1
  • MODE_SET = 2

Property Descriptions

  • int channel = 0

  • int eraser_value = 0

  • int mode = 0

  • int value = 0

Method Descriptions

Operate on a rectangular cuboid section of the terrain. begin and end are inclusive. Choose operation and which voxel to use by setting value and mode before calling this function.

Generated on Jan 21, 2021