Question by
DanteDev · Jun 04, 2016 at 05:07 PM ·
c#collisioninstantiate
Instantine - none collider
Hi! I have problem with box collider. When ball is touching object is trigger on:
public class ClonePath : MonoBehaviour {
public Transform pathTransform;
public GameObject path;
void OnTriggerEnter(Collider obj)
{
//Clone cube and set new position
Instantiate(path, new Vector3(pathTransform.position.x, pathTransform.position.y-(6.694f+2.01f), pathTransform.position.z-(17.55f+0.46f)), pathTransform.rotation);
}
}
Later, ball the falls:
Why ball the falls when cube has box collider? Why box collider is disabled when I use Instantiate?
beztytułu.png
(109.9 kB)
Comment
No question asked, and no visible problem since we don't know what you want to do ...
Does your box have isTrigger ticked by any chance? If so the collider acts simply to notify something is going through it and not as a proper collider.
I created new object for box and there I add colider and select trigger. Now is good.