RotateTowards Confusion

Hi all.
I was trying to create a script to use the right stick to rotate around my player (follow)
I played around with RotateAround. I can’t get the camera to orbit the player no matter how much I strip the code (See below).
I’m not looking for an alternate / better method. I’m just trying to understand why the following will not rotate the camera around the target but just seems to spin around itself with the transform position remaining static.
I know the transform.position and rotatetowards are “fighting” each other. But even with the left stick still it will not rotate the camera around the target object.

Thanks for any input.

 void LateUpdate()
    {
        RightStick();
        Vector3 follow = new Vector3(followXForm.position.x, followXForm.position.y, followXForm.position.z);
        Vector3 offset = new Vector3(0, yDistance, -zDistance);
        Vector3 target = follow + offset;
        float xD = Mathf.Abs(transform.position.x - target.x);
        if (xD >= xDistance)
        {
            Vector3 ps = new Vector3(target.x, target.y, target.z);
            transform.position = Vector3.Slerp(transform.position, ps, Time.deltaTime * smoothMovement);
        }

    }

     void RightStick()
    {
        // right stick camera
//different code before but testing rotatearound
        transform.RotateAround(follow, Vector3.up, smoothRotate * Time.deltaTime);

    }

What is smoothRotate? Where and how is that set?

Thanks.
Just inspector damping values.

Say what :slight_smile: ?

What is the value of smoothRotate. Give me a number. 0? 0.5? 1? 10? 1000?

I see now that lateupdate just resets the transform.position each frame. cancelling out changes to rotatetowards transform change. Don’t know how to rotate around object while still keeping this the same though.

Smoothrotate is 60 right now so it just slerps quickly. Changing the value has no affect.

Sorry. Thanks

I added a condition to not allow transform to change in lateupdate if leftstick is pressed. It now rotates around but still questions.
It rotates at a point the zdistance away from the target in the world. If I set it to rotate around the target. How can I get it to orbit a set zDistance away from the target location all the way around?
As it stands now with Z at 40 it rotates at distance Z in the world to the target.