Performance of BoxCollision and LineTrace

Let’s say i have FirstPersonBP and i need to interact with door. I create BoxCollision in center of camera for overlap detection. But i can use LineTrace function to do same work. Which one way is performant in terms of cpu load e.t.c.?

In the example you provided it’s completely irrelevant but I reckon the trace will be faster. Spawn a million of each and see if there’s a difference ;p. But that’d be a very artificial and useless way to test things.

I would use a line trace, why bother with a box collision? If you want to interact with a door you’d need a very small box collision to make sure you don’t accidentally overlap anything else in the process and confuse your program about which overlapped object you wish to interact with. If you would like to see an example of how to implement a line trace to interact with specific objects check out video #28 in the link below.