What is better: collison box or line trace for RPG?

Hello I need to get information about items lying on the ground and NPC’s standing in front of my pawn. Should I use collison boxes, but I think they are not blocked by walls and that’s bad or line traces with event tick, could they be very calculationintensive when they used with event tick or not?

How do games like Skyrim do that I can’t find information about its system.

Thanks :slight_smile:

Hello,

I would recommend using a box collision as a component on the actors that you’d like to display information on. Then, you can set up an OnComponentBeginOverlap event, and when the character enters the radius of the box collision, you could display a widget or something similar that contains images, text, etc that describe the item that the player has come into contact with. Finally, OnComponentEndOverlap, you can destroy the widget so that it is not kept on the screen after the player leaves the box collision.

Here is a simple example of what I mean:

Feel free to let me know if you have any questions regarding this setup.

Have a great day,

Sean Flint