Quaternion.LookRotation, RotateTowards screw up GameObj's Mesh on Child Object

hello, I have a MasterCube and a ChildCube attach to MasterCube, I want the ChildCube to turn and aim to the Target Object;

when I try to use Quaternion.LookRotation and RotateTowards on ChildCube let it turn, the Mesh of the ChildCube totally screw up, I have no idea why?

but If the MasterCube is an empty GameObject has no Mesh, the ChildCube runs perfectly. very strange

What mistake did I made?

thanks

the code is very simple,the code is attached to MasterCube, and try to rotate child GameObject

public class RotateScript : MonoBehaviour
{
    public GameObject target;
    public GameObject child;   

    // Update is called once per frame
    void Update()
    {
        Vector3 v3 = target.transform.position - this.child.transform.position;
        Quaternion rotateTo = Quaternion.LookRotation(v3, Vector3.up);
        this.child.transform.rotation = Quaternion.RotateTowards(this.child.transform.rotation, rotateTo, 30.0f * Time.deltaTime);
    }
}

and the turning result is like this,

The parent object is scaled unevenly and presumably also rotated. The scaling carries over to the children, so if you scaled the parent cube for its own appearance, the child cube will be warped the same way. With multiple levels of scaling/rotation, things get real weird.

You can do a number of things to affect the shape of the parent cube while keeping its scale at 1,1,1. You can make the “parent cube”'s actual cube mesh a part of a child object, for example; keep the parent’s scale at 1,1,1 and just scale the child. You could also install a plugin like ProBuilder and make the parent cube a mesh in the actual size you want it without needing to scale the transform.

thanks StarManta: when I set the parent object’s scale to be 1:1:1, everything works fine

you rock…

you need to use this.child.transform.localRotation to rotate relative to the perant