The LineTraceByChannel Function tests for collisions along a defined line using Trace Channel, which can be Visibility or Camera, and returns a Hit Result structure with data for the first Actor hit in the collision test. There is also the MultiLineTraceByChannel Function, which returns an array of Hit Result structures:
The input parameters of these Functions are as follows:
- Start: The location vector that defines the start of the line to be used for the collision test.
- End: The location vector that defines the end of the collision test line.
- Trace Channel: A channel used for the collision test. It can be Visibility or Camera.
- Trace Complex: A Boolean value. If it is True, then the trace will test against the actual Mesh. If it is False, then the trace will test against simplified collision shapes.
- Actors to Ignore: An array with Actors that should be ignored in the collision tests.
- Draw Debug Type: This allows the drawing of a 3D line that represents the trace.
- Ignore Self: A Boolean value that indicates whether the Blueprint instance that is calling the Function should be ignored in the collision test.