How would I tell if one part is fully infront of another?

Im looking for a way to tell if one part is fully infront of another visibly. This is kind of a hard concept to explain, let me show some pictures.

in this picture, part 2 is not fully infront of part one.

from this angle, part 2 is fully infront of part 1.

I need a way to tell if one part is fully infront of another through a script. I am unsure of how to even start going about this, I would like any help you can provide.

thanks in advance!

1 Like

Use CFrame:ToObjectSpace() and then get the Rotation-Rotation.p