Hello friendly forum:
I have a 3rd-person game with a camera that follows the character. Because the camera is player-controllable, it’s possible to swing it behind/through objects that will obscure the player during play. My solution for this was to cast a ray from the camera to the player, and if the ray hits anything but the player, the object is faded out.
Now, I am concerned about performance. Should I be? The game is not complex and does not have a great deal of geometry or detail. Raycasting is also not a hugely-expensive function, and I’ll be putting tags on the objects allowed to cull so my raycast isn’t assessing the entire scene.
So basically I wanted to see if I was going about this the right way. Are there better alternatives?
Thank you for your collective and more experienced assessment of my approach!