Object resizing when parent rotated on y axis

so here’s the deal. I have a object under a parent object and i am rotating the parent object on the y axis, but for some reason this also resizes my gameobject!?(see photos under) is there any way to fix thisor is it a bug?

alt text

alt text

code:

public bool Open = false;


	public Quaternion startRotation;
	public Quaternion endRotation;
	public float EndRotationY;

	public float speed = 0.1f;
	public float Waittimr = 0f;



	public bool Minu90;
	public bool Pluss90;

	// Use this for initialization
	void Awake () {


		startRotation = transform.rotation;

	if(Minu90){
			endRotation.y -= 90f;
		endRotation.w = 90;
		}else{
			endRotation.y += 90f;
		endRotation.w = 90;
		      }
		
	}
	
	// Update is called once per frame
	void FixedUpdate () {

		if(Waittimr < 1f)
		{
			Waittimr += 1f * Time.deltaTime;
			Debug.Log("adde 1 sek");
		}

		if( Waittimr > 1f)
		{
		if(Open){
				Open_Door();

		}else{
			
				transform.rotation = Quaternion.Lerp( transform.rotation, startRotation, (speed* 50 )* Time.deltaTime);
		}
		}


	}

	void Open_Door(){

		transform.rotation = Quaternion.Lerp( transform.rotation, endRotation, speed * Time.deltaTime);
	}

startRotation and end rotation are quaternions. Their x, y,and z properties do not represent rotations around the x, y, and z axes. So this section of code is nonsense:

if(Minu90){
  endRotation.y -= 90f;
  endRotation.w = 90;
}else{
  endRotation.y += 90f;
  endRotation.w = 90;
}

(I’m not even sure what you were trying to do with the w component).

I suggest you look into eulerAngles instead.