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”

RPG – like formation algorithm

Well, it’s about time I wrote something Unity-related, eh? This time, from the depths of my disk, I’m pulling out a thing called a formation algorithm. For the sake of simplicity it’s designed for a team of three characters. Ok, you got me – for the sake of simplicity and also because that’s how I’m doing it in my amateur project 🙂

Continue reading “RPG – like formation algorithm”