Hi Everyone,
I have 3 gameObject players in array.
public GameObject [] player;
player = GameObject.FindGameObjectsWithTag ("PlayerBlue");
if (collision.gameObject.tag == "PlayerBlue")
{
i = (store array index here)
transform.parent = player*.transform;*
}
How do I store the index of collided game object? I want to make collided player to be the parent of the ball.
Please advise.
Thank you.