Question by
annonymushubh · Jul 27, 2017 at 05:34 AM ·
unity 5colliderhumanoiddead
i have a model with capsule collider on it and when i shoot it want to dead but it not working
i have a model(Rigged model) with tag "Civil" and attach a capsule collider on it and have a bullet object with box collider on it with tag "Bullet" when i shoot it model should be dead but they does not happen i attach the code with model is
public void OnCollisionEnter(Collision other)
{
if (other.gameObject.CompareTag( "Bullet"))
{
Destroy(other.gameObject);
Destroy(gameObject);
}
}
please how can i fix it...
Comment