Collider oposing car

I created a package but when car get hit to it its stopping car from crossing it
when car collide with package i got desire console output but my car is not able to cross package

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class Packege : MonoBehaviour

{

void OnCollisionEnter2D(Collision2D other){

    Debug.Log("Ouch!");

}

void OnTriggerEnter2d(Collider2D other){

    if(other.tag=="package"){

        Debug.Log("YOu got package");

    }

}

}
this is my packege.cs code

image
This is my package where i also attached tag

image

Your package should be a trigger
image
You need to check this box

Privacy & Terms