Question by
TimeForged · Feb 11, 2019 at 05:56 AM ·
collisionphysicscollider
Unity setting my Player to not active randomly
Hi, I am using this script to destroy the meteor prefab and also set my space ship to be hidden or destroy it in a sense. However Unity is setting my ship to hidden without any collision. I wont even be near the meteors and it destroys my player?
void OnTriggerEnter2D(Collider2D other)
{
if (other.gameObject.tag == "Meteor")
{
Debug.Log("Collision Detected");
Destroy(gameObject);
other.gameObject.SetActive(false);
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612191520im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Recreating 'skin width' functionality on a rigidbody? 0 Answers
Rigidbody randomly going through collider 1 Answer
How to Ignore Collisions Between a Layer and a LayerMask? 1 Answer
Why is my trigger collider acting like a normal collider? 1 Answer
Physics.OverlapSphere not detecting collision! Collision help. 1 Answer