It's not a class to instantiate alone, you may get it from VoxelLodTerrain using the
|void||do_graph ( VoxelGeneratorGraph graph, Transform3D transform, Vector3 area_size )|
|void||do_hemisphere ( Vector3 center, float radius, Vector3 flat_direction, float smoothness=0.0 )|
|void||do_sphere_async ( Vector3 center, float radius )|
|int||get_raycast_binary_search_iterations ( ) const|
|float||get_voxel_f_interpolated ( Vector3 position ) const|
|Array||separate_floating_chunks ( AABB box, Node parent_node )|
|void||set_raycast_binary_search_iterations ( int iterations )|
|void||stamp_sdf ( VoxelMeshSDF mesh_sdf, Transform3D transform, float isolevel, float sdf_scale )|
int get_raycast_binary_search_iterations( )
Turns floating voxels into RigidBodies.
Chunks of floating voxels are detected within a box. The box is relative to the voxel volume this VoxelTool is attached to. Chunks have to be contained entirely within that box to be considered floating. Chunks are removed from the source volume and transformed into RigidBodies with convex collision shapes. They will be added as child of the provided node. They will start "kinematic", and turn "rigid" after a short time, to allow the terrain to update its colliders after the removal (otherwise they will overlap). The function returns an array of these rigid bodies, which you can use to attach further behavior to them (such as disappearing after some time or distance for example).
This algorithm can become expensive quickly, so the box should not be too big. A size of around 30 voxels should be ok.
Generated on Sep 12, 2023