Quantcast
Viewing latest article 7
Browse Latest Browse All 81

My monster only choose one Target

Hi, I have been using as base, script monsters made by Unity, but now I have a problem, I have a couple of characters on the Game, so it have became a problem for my monsters, they don't know how to choose the Target properly, here you have the part of the code that chooses a player (It always choose the second). What I can do to make my monster consider both players?

if (!target)
    target = GameObject.FindWithTag("Player").transform;

Viewing latest article 7
Browse Latest Browse All 81

Trending Articles