Surfaces crossed by a segment
trace_throughLists every solid a segment passes through, in order, with entry/exit surfaces, distances and thickness for sound propagation through walls and doors.
Instructions
Lists every solid the segment start->end goes through, in order, by repeated traces (FractionLeftSolid gives where each solid is left). Result: {surfaces: [{entry, entry_normal, entry_surface (same surface fields as trace: mat_name, surfaceprop, texture, entity), distance_from_start, exit, exit_normal, exit_surface, thickness (units), reaches_end_inside?}], count, total_thickness, distance (segment length), truncated}. A start point inside a solid gives a first entry with entry_surface null. Made for sound propagation through walls and doors. Example: {"start": [0, 0, 64], "end": [800, 0, 64]}. Needs a loaded map (map_load): the server and client realms do not exist at the main menu.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"start": "<start>",
"end": "<end>"
},
"name": "trace_through"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | End, [x, y, z] in Hammer units. | |
| mask | No | Content mask: MASK_SOLID (default), MASK_SHOT, MASK_SHOT_HULL, MASK_SOLID_BRUSHONLY, MASK_PLAYERSOLID, MASK_PLAYERSOLID_BRUSHONLY, MASK_NPCSOLID, MASK_WATER, MASK_VISIBLE, MASK_OPAQUE, MASK_ALL, or the number. | |
| realm | No | Realm (default server). | |
| start | Yes | Start, [x, y, z] in Hammer units. | |
| filter | No | Entity indexes the trace ignores (e.g. the player). | |
| instance | No | Optional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance. | |
| max_surfaces | No | Max solids listed (default 32); truncated says if more remained. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| note | No | ||
| count | Yes | ||
| warning | No | ||
| distance | Yes | ||
| surfaces | Yes | ||
| next_call | No | ||
| truncated | Yes | ||
| answered_by | No | ||
| truncated_note | No | ||
| total_thickness | Yes | ||
| version_warning | No |