build_mesh_bvh
Checks if a bounding volume hierarchy (BVH) can be built and read back as valid for a DynamicMeshActor's current mesh, without modifying it.
Instructions
Build a BVH (bounding volume hierarchy) for the live dynamic mesh of a DynamicMeshActor in the editor world with BuildBVHForMesh, and read it back with IsBVHValidForMesh. The plugin keeps no BVH between calls: this one is dropped on return, and the spatial-query tools (find_nearest_point_on_mesh, find_nearest_ray_intersection_with_mesh, is_point_inside_mesh) build their own on every call, so they never need this first. It checks that a BVH can be built for the mesh as it is now: built is true when the engine reported no error and the BVH reads back as valid; the call fails otherwise. The mesh is not changed.
Returns: { actor_name, built: bool, b_only_if_invalid: bool, bvh_valid: bool, vertex_count, triangle_count } -- actor_name is the dynamic mesh component's name, not the actor label; b_only_if_invalid echoes the request; the counts are those of the mesh the BVH was built for.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_name | Yes | Label or name of the target DynamicMeshActor. | |
| b_only_if_invalid | No | Optional bool, default true; it has no effect, since no earlier BVH is kept and every call builds a new one. |