Пример #1
0
 public void OnTriggerEnter(Collider other)
 {
     if (!CollisionController.IsIgnored(other.tag))
     {
         agent.Punish();
     }
 }
Пример #2
0
 public void OnTriggerStay(Collider other)
 {
     if (CollisionController.IsIgnored(other.tag))
     {
         return;
     }
     isWall = true;
 }
Пример #3
0
    private double Distance(Collider other)
    {
        if (CollisionController.IsIgnored(other.tag))
        {
            return(defaultDistance);
        }
        var carPos = GetCarPosition();

        return(Vector3.Distance(other.ClosestPoint(carPos), carPos));
    }