raycast_scene
Trace the world to get real JSON hit results (actor, component, impact point, normal, distance) without parsing export text. Specify a world context for accurate collision checks.
Instructions
Line trace / raycast the world and get a REAL JSON hit result -- what actor and component was hit, impact point, normal and distance -- instead of the UE export-text FHitResult blob that call_function on a line-trace UFUNCTION returns, so no Python parsing is needed. Accepts a world selector (editor / server / client / pie:N), which matters twice: an EDITOR-world trace does not hit World-Partition/OFPA actor collision (only cooked in the PIE physics scene) and reads as a clean miss, and in co-op a miss on the client world looks identical to a missing collider -- pass "server" or "pie:N" so a hit:false is interpretable. Also the honest way to prove a custom collision CHANNEL blocks: trace the same segment on a known-good channel (Visibility) and on the new one and compare actor/component/Z/distance, because get_collision_profile does not see +EditProfiles overrides.
Returns: { hit: bool, blocking_hit: bool, actor_path: string, actor_name: string, component_name: string, location: {x,y,z}, impact_point: {x,y,z}, normal: {x,y,z}, impact_normal: {x,y,z}, distance: float, bone_name: string, physical_material: string, face_index: int, world: string, world_name: string|null, world_package: string|null, world_type: string|null, net_mode: string|null, pie_instance: number }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | World-space [x, y, z] trace end | |
| start | Yes | World-space [x, y, z] trace start | |
| world | No | Which world to trace: absent/"editor" (default) | "server" (the PIE world with authority) | "client" | "pie:N" | "pie" (ambiguous: PlayWorld, else the first PIE context) | "game" (alias of "pie"). Editor-world traces do NOT hit World-Partition/OFPA actors, so pass a live world to verify obstacle collision; with 2+ PIE instances prefer "server"/"pie:N". | |
| ignore_actors | No | Actor names/labels to exclude from the trace. | |
| trace_channel | No | Collision channel, canonical ("ECC_Visibility") or friendly ("Visibility", "Camera", or a custom channel name). Defaults to "Visibility". A channel created THIS session is not in the live profile table yet -- restart the editor before trusting a trace on it. | |
| trace_complex | No | Test against complex (per-poly) collision instead of simple. Defaults to false. | |
| return_physical_material | No | Populate physical_material in the result. Defaults to false. |