- Home /
 
How do I make a scene change when my Player collides with a item?
I now have a simple code like this: function OnCollisionEnter(goalCollision : Collision){
     if(goalCollision.gameObject.tag == "Player"){
     
         Application.LoadLevel("GameWonScene");
         
     }
 
 }
 
                
               This script-file is attached to a ball which will be the goal to catch. But it doesn't work and I have tried OnControllerColliderHit too.
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by Jerkenhag · Mar 05, 2013 at 09:32 PM
I found the answer by changing the OnCollisionEnter to OnTriggerEnter and change the : Collision to : Collider and make the object a trigger.
Your answer