Get transform of instantiated Prefab; Help appreciated.

Hi everyone,

I have a small problem I can't seem to deal with. I am trying to destroy a plane/player object and instantiate a dead' camera smoothly looking at the crash site. The problem is that the target of the camera is a prefab (the wreck of the plane) and the camera will look at the prefab position when it was created (0, 0, 0) not where the prefab is actually instantiated.

This is the code to instantiate both the prefab and the camera...

I wonder if placing a camera in the wreck prefab would work? I'll do that just now :)

function Die () {

   var planeWreckClone = Instantiate(planeWreck, transform.position, transform.rotation);
   var deadCamera = Instantiate(deadCamera, transform.position, transform.rotation);

   Destroy(gameObject);
}

Thanks in advance!

I wonder if placing a camera in the wreck prefab would work? I'll do that just now :)

Well, what do you know. It worked :)

phew; artist should not code.