Description
The MeshesOnly
method in the Editor.Trace
struct is used to configure a trace operation to only consider mesh geometry, specifically the CMapMesh nodes, when performing the trace. This is particularly useful when you want to ignore other types of geometry or entities in the scene and focus solely on mesh-based elements.
Usage
To use the MeshesOnly
method, you need to call it on an instance of the Editor.Trace
struct. This method modifies the trace settings to ensure that only mesh geometry is considered during the trace operation.
Example
// Create a trace instance
Editor.Trace trace = new Editor.Trace();
// Configure the trace to only consider mesh geometry
trace = trace.MeshesOnly();
// Define the start and end points for the trace
Vector3 start = new Vector3(0, 0, 0);
Vector3 end = new Vector3(10, 10, 10);
// Run the trace in the specified world
Editor.TraceResult result = trace.Run(world);