- Home /
 
 
               Question by 
               FatalNightmare · Jan 11, 2013 at 12:37 AM · 
                javascriptcollisiontriggerplayer  
              
 
              Code for other GameObject to Collider with other GameObject
Hi I was wondering what was the code or function to state that if GameObject1 Enters Trigger of tag GameObject2 than this will happen. This is code I have now but it only works when the Player tag enter the box that this code is on. How do I make it so it works when the player enters a box other than the one this code is on.
 function OnTriggerEnter(other : Collider){
  if(other.tag == "Player"){
      AllowSpawn = true;
  }
 
              
               Comment
              
 
               
              Answer by cdrandin · Jan 11, 2013 at 01:29 AM
You will need to use collision's contact point. http://docs.unity3d.com/Documentation/ScriptReference/ContactPoint.html
I dont think those are what I need. They dont look at other collison to other collison
Your answer