[ SOLVED]2D collision issues

I’m having a terrible time trying to figure out the collisions etc for the objects.

I want to have a invisible area, that when the player enters it registers as a collision and something happens. However I cant get the collision to register.

This is the code im using for detection (It is attached to the player)

 void OnTriggerEnter2D(Collider2D other)
    {
      
        if (other.gameObject.tag == "EnemyTrigger")
        {
            Debug.Log("VarChange");
            spawnVar = 1;
        }


    }

And this is the set up of the player and the EnemyTrigger.

If anyone can possibly help me out with this. Its very possible I have just done something stupid that I havent been able to see in the past 3 hours :rage:

3367183--263887--EnemyTrigger.PNG

Sorry, nevermind, solved it. Forgot to tag the collision. -_- 3 hours well spent :frowning:

lol That happens all the time :stuck_out_tongue: my favourite one is when I write up a really lengthy post explaining my problem only to solve it in my head just as I’m about to put the thread up.

1 Like