SimpleIncremental icon indicating copy to clipboard operation
SimpleIncremental copied to clipboard

SpawnPoint.cs triggers off of anything colliding with its trigger, not just the player

Open ErikOverflow opened this issue 6 years ago • 0 comments

Describe the bug If something else passes through the a trigger that a SpawnPoint is listening to, enemies still start spawning.

Proposed Solution Check the triggering GameObject (go) to see that it is the player. This should not be done using tags. Instead, check to see if the triggering GameObject has a component that only the player would have (Like PlayerLevel, or PlayerStatsSystem) and only start spawning if it exists.

ErikOverflow avatar Apr 15 '19 14:04 ErikOverflow