I currently have my player object set with a dynamic rigidbody and a box collider, and the object I want it to collide with just has a box collider.
The player is on the Player layer, and the object is on the Items layer.
This is the code I'm using that works for the collision, but I want the collision to work, but allow the player to pass through the object instead of bumping into it.
This is the code I'm using currently;
using System.Collections; using System.Collections.Generic; using UnityEngine; public class DialogueSpawn : MonoBehaviour { public GameObject dialogueBox; private void OnCollisionEnter2D(Collision2D collider) { dialogueBox.SetActive(true); } } What am I missing to get this to work? I've been searching for two days for a solution to this problem and I'm not sure where to go from here, because this game is supposed to be a small project for figuring out layer collisions.