private void UpdateControlTransform()
    {
        UpdateTouchPad();

        // Compute orientation delta from selection.
        targetOrientationDelta = ControlRotation * InverseControllerOrientation;

        // If we are smoothing orientation, do it!
        if (orientationSmoothingTime > 0)
        {
            // Adjust speed of smoothing based on the distance between the target offset, and current offset.
            float speed = Quaternion.Angle(orientationDelta, targetOrientationDelta);
            speed = Mathf.Clamp01(speed / MAX_ANGULAR_DELTA);
            float smoothedDeltaTime = (speed * Time.deltaTime) / orientationSmoothingTime;
            // Apply the delta.
            orientationDelta = Quaternion.Slerp(orientationDelta,
                                                targetOrientationDelta,
                                                smoothedDeltaTime);
            // Otherwise assign it directly.
        }
        else
        {
            orientationDelta = targetOrientationDelta;
        }

        // Compute orientation delta from selection.
        targetOrientationDelta = ControlRotation * InverseControllerOrientation;

        // Assign the position of the control transform.
        controlTransformPosition = controlZDistance *
                                   (orientationDelta * normalizedForward) +
                                   ControlPosition;

        if (alwaysOnGround)
        {
            BoxCollider bc = interactiveItem.GetComponent <BoxCollider>();
            if (bc)
            {
                RaycastHit hit;
                if (Physics.Raycast(transform.position + bc.center, Vector3.down, out hit, 500f))
                {
                    if (Vector3.Dot(hit.normal, Vector3.up) > 0.95f)
                    {
                        float y = hit.point.y + (bc.size.y / 2f - bc.center.y) * transform.localScale.y;
                        controlTransformPosition = new Vector3(controlTransformPosition.x, y, controlTransformPosition.z);
                    }
                }
            }
        }

        // Get the distance between the control transform and the controller transform.
        Vector3 targetToControl = ControlPosition - controlTransformPosition;

        // Increase tension when the control transform is closer to the controller transform.
        controlTension = Mathf.Clamp01((distanceFromControllerMax - distanceFromControllerMin) /
                                       (targetToControl.magnitude - distanceFromControllerMin + 0.0001f));

        // Modifies movement responsiveness based on the mass of the rigidbody.
        weightScale = Mathf.Clamp((MAX_MASS / rigidbodyCmp.mass), MIN_MASS, MAX_MASS);
    }