Quaternion.Slerp on local axis

I have a Playercontroller gameobject which is looking at the center of the game world with LookAt function.
That Playercontroller has a child object which has the graphics on it and I would like to rotate that child gameobject in its local axis(for example when A is pressed it rotates it to the left and when D is pressed then to the right)

This is what i use for now in the child gameobject for WASD input:

	if (Input.GetKey ("a")) {
			transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.AngleAxis(-90, Vector3.up), Time.deltaTime * rotationSpeed);
		}

It works at the beginning because the playercontroller has 0, 0, 0 rotations, but obviously the child object doesnt rotate correctly when i start to move. I have tried transform.localRotation but it gets really weird results(continuously rotation, does not stop at wanted Y axis degrees).

Any help or guidance would be greatly appreciated

If you want to rotate your current rotation a certain number of degrees, you multiply the rotation you want “added” with your current rotation. It’s weird, I know, but Quaternions are Quaternions.

So I’m pretty sure this would work:

if(Input.GetKey ("a")) {
    Vector3 currentRotation = transform.rotation;
    Vector3 wantedRotation = currentRotation * Quaternion.AngleAxis(-90, Vector3.up);
    transform.rotation = Quaternion.Slerp(currentRotation, wantedRotation, Time.deltaTime * rotationSpeed);
}

This means that you will, when holding down a, Slerp towards a rotation that’s 90 degrees counterclockwise from your current rotation. This should give a constant rotation speed.

Hope that helps!