Line trace not working against planes


If you perform a line trace by channel (viz or camera) channel against a plane, it won’t work. It will work against all other shapes; box, cylinder, tube, …

I think this is a bug, unless it’s something to do with planes only having one side which is causing the issue, but I’d still expect a visibility result to come back for a plane.

  1. Create a new project, any type, I used blank
  2. Add some basic shapes to the level; plane, box, …
  3. Add a new blueprint actor, something that we can use to fire a trace and add it to the world
  4. On event begin play, have the blueprint enable input
  5. Add a keypress event for any button you like, I used 1
  6. On key press do a line trace from the player pawn location out a few thousand units
  7. If the line trace hits, print the name, enable debug rendering of the line trace for testing
  8. Play and the traces will impact with the floor and the shapes you placed, but not the plane

I’ve attached a sample project to make it easier. Let me know if you need any more details or info.


link text

Hello daveREspawn,

I’m not seeing any sort of issue with neither the project that I created based off your steps, which uses Line Trace by Channel, and the project your provided, which uses Line Trace by Object.

Here’s a screenshot of the behavior I’m seeing:

The line trace is hitting the plane in the same way that it hits the other objects. Is there something that I may be missing?

That would be the cause then. If you hover over the “Trace Complex” option, it mentions that it will resolve as True for Complex Collision but false for Simple collision. The Plane mesh has Simple collision. You can test this by making a copy of the static mesh used for the Plane asset (you wouldn’t want to edit the default as it is part of the Engine Content) and edit its Collision Complexity setting to “Use Simple Collision as Complex”. If you then assign your newly duplicated mesh to the Plane asset in your level, the line trace will hit it as it is now using Complex collision.

Sorry Matthew, I must have missed a step.

When I run the project as I sent it, it works for both Objects and Channel, but if I turn on “Trace Complex” it won’t work for the plane on either trace.