I’m fairly new to unity and am basically just learning the simple stuff, sorry in advance if this is a dumb mistake, and for the inevitable formatting errors.
I have a player in a 2d game, that will walk over a flower that has a Box Collider 2d with IsTrigger checked, and then the following script on the player object should send a message to let me know the player collided with the trigger
using UnityEngine;
public class Itempickupchecker : MonoBehaviour
{
void OnTriggerEnter(Collider other)
{
Debug.Log("Flower picked up");
}
}
however when the player walks over the flower nothing happens. The collider on the flower is this:
and the colliders on the player are these:
I think the issue is either a typo, something wrong with the colliders/rigidbody or me using some function or component meant for a 3d game perhaps, but im not really too sure
thanks for any help