Checking if a Transform is behind another Transform in Unity3d

The title is a bit misleading, because what I’m actually trying to figure out today is if a Transform sees another one from behind. The reason why I used this title is because I saw a lot of people asking questions formulated like the topic of this entry when they were actually trying to find a way to check if their game characters saw the backs of their opponents. The most popular SO / Unity forum answers only mentioned the Vector3.Dot method which is insufficient in this case.

Continue reading “Checking if a Transform is behind another Transform in Unity3d”