- Home /
Question by
jacksterooney · Jan 01, 2013 at 06:59 PM ·
collison
What is wrong with this collision script?
I am trying to detect when two planes (tagged as "Room") are colliding/intersecting when created, and then restarting the level if they do. Is there anything wrong with this script, or is there a problem with planes intersecting in unity?
function OnCollisionEnter (other : Collision){
if (other.gameObject.tag == "Room"){
print("Room Collision");
Application.LoadLevel("Level");
};
};
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613090228im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Player Controller Rotation Script Help 2 Answers
Spawn Script Not Working 1 Answer
Changing or replace objects 2 Answers
BCE0044 Error 1 Answer