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