find_nearest_point_on_mesh
Locate the closest point, triangle ID, and barycentric coordinates on a DynamicMeshActor's current mesh for any 3D query point, with an optional max search distance.
Instructions
Find the nearest point on the live dynamic mesh of a DynamicMeshActor to a 3D query point via UGeometryScriptLibrary_MeshSpatial::FindNearestPointOnMesh. Every call builds a fresh BVH from the mesh as it is now (the plugin keeps none), then queries it, so the answer always reflects the latest mesh edits. found is false when no triangle lies within max_distance, or the mesh is empty. The mesh is not changed.
Returns: { actor_name, found: bool, valid: bool, triangle_id, position_x/y/z, bary_coords_x/y/z } -- actor_name is the dynamic mesh component's name, not the actor label.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor_name | Yes | Label or name of the target DynamicMeshActor. | |
| query_point | No | [x, y, z] query point in the mesh's local space. | |
| max_distance | No | Optional float; max search distance (0 = unlimited). | |
| allow_unsafe_modified | No | Optional; maps to bAllowUnsafeModifiedQueries (default false). It has no effect: the BVH is built fresh on every call, so it always matches the mesh. |