Traces for objects

The LineTraceForObjects Function tests for collisions along a defined line and returns a Hit Result structure with data for the first Actor hit that matches one of the Object Types values specified in the input parameter.

The MultiLineTraceForObjects Function has the same input parameters as the LineTraceForObjects Function. The difference between the functions is that the MultiLineTraceForObjects Function returns an array of Hit Result structures, rather than a single result, making it more expensive to perform. The next screenshot shows the two TraceForObjects Functions:

These are the input parameters of the two TraceForObjects Functions:

  • 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.
  • Object Types: An array that contains Object Types that will be used in the collision test.
  • 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset