Performance: line tracing vs collision component

Assume I have a character who can interact with specific objects in front of it. Is it better to check if there are such objects via line tracing or collision component’s OnOverlapBegin?

Unless you have a hundred players, it won’t really matter.

What you should probably consider instead is, which one will work better? For example, OnOverlapBegin triggers even if there is a wall between your player and the object, and even if you’re near, but you’re looking behind or at the sky, while tracing has no such issues.

Or do you have a specific case, in which these issues do no affect you?

It is just as you have mentioned and such problems may occur. I am just trying to save as much performance as possible. Thank for your reply :slight_smile: