I have sphere collider on two gameobject and through when they get near each and the player. I went to project setting and uncheck the physics manager box that still didn't help and I also made script and attach to the enemy ai. Here is my script :
using UnityEngine;
using System.Collections;
public class dd : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
Physics.IgnoreCollision(gameObject.collider, anotherGameObject.collider);
Physics.IgnoreLayerCollision(1, 2);
}
}
↧