Destroying game object upon trigger issue,Unity 2D destroy player 2 sprite via trigger issue
Im new to code. but im making a simple 2D running race game where both players have to race to their treasure chest. the win mechanic is supposed to be so that if Player one touches their own treasure chest, it will set the Player two's sprite to inactive (deleting it) effectively proving that player one has won by getting their first.
however i cant work out what to write here, any help?,Im new to code.and im making a basic game where two players have to race to get to their treasure chest first. and im trying to make it so that if Player Ones sprite collides with their own treasure chest object, it will destroy player two's character sprite by making it inactive. as destroying P2 will be the win mechanic to indicate that P1 has won.
Your answer
Follow this Question
Related Questions
How to set Camera Limits in Unity that would stay accurate for different screen ratios? 2 Answers
Can not load the next scene 0 Answers
clicks pass through UI elements on android 1 Answer
OnTriggerEnter2D called without collision 0 Answers
What algorithms might be needed to build AI for a game like American Football in Unity? 1 Answer