This was working honestly, 10 minutes ago. Then I closed and reloaded it my triggers weren’t triggering.
I wan’t to have a trigger whenever the player walks over a ‘portal’.
The portal is just a sprite with a capsule collider 2d with ‘Is Trigger’ checked.
The player has a rigidBody2D and colliders as well.
The portal script is attached to the portal.
Player Inspector
Portal Inspector
Portal Code
public class PortalScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter2D(Collider2D coll) {
Debug.Log ("collided with the portal");
}
}
Am I missing something completely obvious?