Navigation
API > API/Plugins > API/Plugins/GeometryScriptingCore > API/Plugins/GeometryScriptingCore/GeometryScript > API/Plugins/GeometryScriptingCore/GeometryScript/UGeometryScriptL-_23
References
| Module | GeometryScriptingCore |
| Header | /Engine/Plugins/Experimental/GeometryScripting/Source/GeometryScriptingCore/Public/GeometryScript/MeshSpatialFunctions.h |
| Include | #include "GeometryScript/MeshSpatialFunctions.h" |
| Source | /Engine/Plugins/Experimental/GeometryScripting/Source/GeometryScriptingCore/Private/MeshSpatialFunctions.cpp |
static UDynamicMesh &42; FindNearestPointOnMesh
&40;
UDynamicMesh &42; TargetMesh,
const FGeometryScriptDynamicMeshBVH & QueryBVH,
FVector QueryPoint,
FGeometryScriptSpatialQueryOptions Options,
FGeometryScriptTrianglePoint & NearestResult,
EGeometryScriptSearchOutcomePins & Outcome,
UGeometryScriptDebug &42; Debug
&41;
Remarks
Finds the nearest point (Nearest Result) on the Target Mesh to a given 3D point (Query Point) by using the Query BVH.
Parameters
| Name | Description |
|---|---|
| QueryBVH | a BVH associated with the Target Mesh |
| QueryPoint | a 3D location relative to the local space of the mesh |
| NearestResult | on return, holds the nearest point on the mesh to the QueryPoint |
| Outcome | will be either Found or Not Found depending on the success of the query. Note NearestResult.bValid will be false if the query failed. |