How do I instantiate a prefab at the collided objects position, and not at the position of the object holding the collider and script?
void OnCollisionEnter(Collision c)
{
Instantiate(prefab, c.gameObject.transform.position, someRotation);
}
Also, see this: Unity - Scripting API: Collision.contacts
Edit:
Trigger
void OnTriggerEnter(Collider c)
{
Instantiate(prefab, c.transform.position, someRotation);
}