How to move move gameobjects to a specific point?

Alright so I making a game where you shoot and the camera follows the bullet. I got the camera to follow the bullet but I can’t reset the camera. I’m using two different cameras, a main camera that follows the player and a camera that follows the bullet. Is there way to reset the camera or make it move to a specific point and a specific rotation?

You can declare a transform, and give it a Vector3, and then apply the transform to the Camera. like this:

*var cameraDestination:Vector3 = new Vector3(-1.0, 2.2, 3.5); //x, y, and z
myCamera.transform.Translate(cameraDestination);

You can also do this:

myCamera.transform = someOtherObject.transform;*

A camera has a transform like any GameObject - you can assign to transform.position and transform.rotation as you do with all GameObjects.

If you want to restore the initial position/rotation of the camera, save them before it starts following the bullet, and restore both to return the camera to the inital position/rotation (camera script):

// member variables (declared outside any function)
var startPos: Vector3;
var startRot: Quaternion;
  ...
  // save pos/rot before moving:
  startPos = transform.position;
  startRot = transform.rotation;
  // follow the bullet with your code, then restore
  // the initial position/rotation when needed:
  transform.position = startPos;
  transform.rotation = startRot;
  ...

If you want to place the camera in some specific position, create an empty object, position and rotate it, then copy its transform.position and transform.rotation to the camera transform when needed.