K
K
KraGen.Developer2022-01-11 13:37:19
Unity
KraGen.Developer, 2022-01-11 13:37:19

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>();
    }

but here's how to find out if this colider touches the player?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nekit Medvedev, 2022-01-12
@NIKROTOS

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 question

Ask a Question

731 491 924 answers to any question