How make child object rotate inverse to its parents rotation ?

Hi guys , I thought that this would be easier done then said but I was wrong.

I have an object in my scene named ParentObject and it has a child object named Pivot

Pivot has a line render on it(just to help us visualize the rotation)

Picture:

we see that the parent and child rotation values are all 0, which is good.
if we rotate our parent object, the child object will follow the parents rotation as expected but we do not want this.

Because the child rotation should always be inversely proportional to the parent rotation it will appear to be at a 0,0,0 rotation , which i what we want. So common sense would tell us that all we need to do is add or add or subtrack some rotational value from the child rotation to bring it back to what APPEARS to be a 0,0,0 rotation. but that does not work

Look at the now rotation values and the direction in which the Y axis is now in.

if we change the y value of the child object to compensate for the Y rotation of the parent , then line will tilt and everything goes wrong.

This works fine for me:

using UnityEngine;
using System.Collections;

public class RotationTest : MonoBehaviour {

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
		transform.Rotate (0.0f, 1.0f, 0.0f);
		transform.GetChild (0).Rotate (0.0f, -1.0f, 0.0f);
	}
}