Could a "custom line trace" be more performant than line trace by channel?


I have a room. The walls of this room are planes, but different rotated. They never change on runtime. I want to do much line traces for the walls of the room in a tick-event. Line traces, when doing much of them, are not very performant. Before I struggle through the mathematics, could a “custom line trace”, only made with mathematics (line-plane intersection), be more performant than the line trace by channel?

Thank you,


Tried it today. Assuming the walls/planes are not moving, rotating or scaling, a “custom line trace” by math is about 50%-80% faster than a line trace by channel, even with a very unoptimized structure (checking every line against every plane, remember the point with the smallest distance to the line).

Edit: This was not a fair comparison. I made the “custom line trace” in C++ and the other line traces in blueprints. With the line traces in C++ the math-method is only 20-30% faster.