Rotation moving gameObject when position is not 0,0,0

I’ve spent a couple hours trying to figure out why when the gameObject is rotated it’s also moving the position of the gameobject.

When the position of the gameObject is 0,0,0; the object is rotated as you’d expect and only effects the Y axis. However once the object is moved from position 0,0,0, the rotation moves the position as well as the rotation.

The gameObject is NOT parented.

Here’s the snippet:

 transform.rotation = Quaternion.Euler(0, ry, 0);

 var position = Vector3(x, distance, z);
 var worldPosition = transform.TransformDirection (position);
             
 transform.position = Vector3.Lerp (transform.position, worldPosition, zoomSpeed * Time.deltaTime);

Your “centerpoint” or “pivot point” is probably not where you think it is. Check each to see where the arrows/rotational-circles show up, and that is the point it will rotate about.

You need to make sure in your modelling tool that your model is saved at 0,0,0 origin and that any transforms are removed. For example Maya has a freeze transforms option.