im dropping bombs from my 2d plane
if i dont have “is trigger” selected on my box 2d collider it actually works the way i want to but the problem is my plane can then hit the bombs in the air.
my ground collider and bomb are on the same player layer
but if is trigger is enabled the bomb just falls through
here is my bomb script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BombDrop : MonoBehaviour
{
public Animator anim;
private bool exploding = false;
void Update()
{
if (exploding)
{
anim.SetBool("HitGround", true);
}
}
private void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.tag == "GroundBorder")
{
Debug.Log("Collider works");
exploding = true;
}
}
}