Rotating a line renderer

I want to make a really abstract minimap for my racing game, which consists only of a line for the track (the line renderer) and a dot/s for the car/s. My problem is that I don’t know how to set the main camera as pivot point of the map so that the map is always in the top right corner of the screen and how to rotate the whole line when the camera rotates.
Any ideas?

Ok, found the answer, you loop through the whole line and rotate every point with the rotation matrix. If someone needs the code:

var PIDiv180 = Mathf.PI/180;
function rotate(pivotPoint:Vector3, pointToRotate:Vector3, angle:float)
   var result:Vector2;
   var Nx = (pointToRotate.x - pivotPoint.x);
   var Ny = (pointToRotate.z - pivotPoint.z);
   angle = -angle * PIDiv180;
   result = Vector2(Mathf.Cos(angle) * Nx - Mathf.Sin(angle) * Ny + pivotPoint.x, Mathf.Sin(angle) * Nx + Mathf.Cos(angle) * Ny + pivotPoint.z);
   return result;