Hi All,
so upon driving over the package, i get both messages that the “package was picked up” and “Package Delivered”
i checked my package, is tagged as Package, and my customer is tagged as customer. for some reason i don’t have the same issue with the customer.
I’ve included the code. as i m not too sure what I’m doing wrong.
Thank you all for your help!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Amazon: MonoBehaviour
{
void OnCollisionEnter2D(Collision2D other)
{
Debug.Log("ouch!");
}
void OnTriggerEnter2D(Collider2D other)
{
Debug.Log("What was that?!");
if (other.tag == "Package")
{
Debug.Log("Package picked up");
}
if (other.tag == "Customer")
{
Debug.Log("Package Delivered");
}
}
}