I guess that most of the interactable objects in the game use two spheres with OnBeginOverlap and OnEndOverlap events. However, I’ve noticed some objects seem to utilize a line trace method. These objects do not display the button prompt icon unless the camera is directly looking at them.
It appears they still use collision components to show icons, but upon collision with a smaller sphere, they also perform a line trace on that sphere. This isn’t done on the object itself, as that would be too precise for a third-person perspective.
If anyone familiar with the game can confirm or correct my understanding, I’d appreciate it. Thanks!
I don’t know which aspect of RE4 you’re referring to specifically there, but RE actually uses a bespoke engine, so it’s anyone’s guess.
But, I can say, that when you get that line trace feel, but the game seems to be a little generous with the direction of it, it’s probably tracing to a larger sphere you can’t see.
Like with buttons etc, they’re too small to expect someone to actually line the camera ( or mouse ) up with them, so we put a larger collision sphere there so that people can operate the device without too much fiddling about.
I know that it is built on RE Engine, but it seems that internal logic is similar. Regarding the thing about invisible collision sphere, that’s pretty much what i said. I actually tested many interactable objects in the game and it seems that only one type of them uses something more difficult than simple collision sphere for interaction. I dont know if it’s worth implementing in my game