I'm having a problem where all of the lines of sight that my enemies have act uniformly. This is what they are supposed to look like:
<img src="http://puu.sh/2OCMf.png" border="0" />
However, the moment I walk into the line of sight of this enemy (he is the first enemy that appears in the level and it only works with him) then all of the other lines of sight follow that same behavior, and I have no idea why because all of the lines of sight are in containers with the enemies. Shown here:
<img src="http://puu.sh/2OCOm.png" border="0" />
Here's the code I'm using where I think the problem is occuring:
<img src="http://puu.sh/2OCSa.png" border="0" />
Is there something wrong with what I'm doing?
Develop games in your browser. Powerful, performant & highly capable.
Does anyone know the problem..?
I actually fixed it. If anyone in the future has the same problem this is how I fixed it:
<img src="http://puu.sh/2P2TP.png" border="0" />