Answer the question
In order to leave comments, you need to log in
How to find out if the player is touching the 5th object in the pool to the solider?
In general there is a pool of 5 objects. And there is a player. How can I find out if the Player is touching the 5th object in the pool. Like I did it
public Collider colider;
void Start()
{
colider = pool[4].gameObject.GetComponent<BoxCollider>();
}
Answer the question
In order to leave comments, you need to log in
Does the fifth object have a collider? Let the object itself say that it has touched the player. And tells him what is required (number in the pool).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question