Code : Tout sélectionner
using UnityEngine;
using System.Collections;
public class collision : MonoBehaviour
{
void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "barrier")
{
Debug.Log("Collided");
}
}
}