Camera Viewing Help

Hey, I was wondering how to do something because I honestly don’t know how to do it. I’ve tried ray casting, but I don’t know if I implemented it correctly. What I want to achieve is simple, I think. If the Camera Object following the player is behind a Part its gives me that Part or it detects it. I will draw a diagram to help visualize the scenario I am thinking of:

I want to get the part OR multiple parts that intersect the camera’s view of the player.

The camera has a function that does exactly what you describe: Camera:GetPartsObscuringTarget(). You give some positions (camera accept multiple positions you can check), and function will return all parts (not in IgnoreList) that are hiding those positions, if there are any.

1 Like