TraceResult Run( MapWorld world )

book_4_sparkGenerated
code_blocksInput

Description

The Run method in the Editor.Trace struct is used to execute a trace operation within a specified map world. This method is part of the tracing functionality provided by the editor tools, allowing developers to perform collision detection and other spatial queries within the map editor environment.

Usage

To use the Run method, you need to have an instance of Editor.Trace and a valid Editor.MapDoc.MapWorld object. The method will return an Editor.TraceResult which contains the results of the trace operation.

Example usage:

Editor.MapDoc.MapWorld mapWorld = GetMapWorld(); // Assume this method retrieves the current map world
Editor.Trace trace = new Editor.Trace();
Editor.TraceResult result = trace.Run(mapWorld);

if (result.Hit)
{
    // Process the hit result
    Vector3 hitPosition = result.Position;
    // Additional logic here
}

Example

Editor.MapDoc.MapWorld mapWorld = GetMapWorld(); // Assume this method retrieves the current map world
Editor.Trace trace = new Editor.Trace();
Editor.TraceResult result = trace.Run(mapWorld);

if (result.Hit)
{
    // Process the hit result
    Vector3 hitPosition = result.Position;
    // Additional logic here
}