Something like this should work in case you don’t find anything more elegant:
- startVector = (startPos - originPos).normalize()
- endVector = (endPos - originPos).normalize()
- axisOfRotation = CrossProduct(startVector, endVector)
- angleOfRotation = arccos(DotProduct(startVector, endVector))
- use GSAP to interpolate the currentAngle between 0 and angleOfRotation over time
- on each iteration, use Vector3.applyAxisAngle to calculate the currentVector using the startVector, axisOfRotation, and currentAngle (do not modify the startVector)
- on each iteration, set currentCameraPosition = originPos + (currentVector * distance)
Also see [SOLVED] Move items around a sphere and Quaternion.setFromUnitVectors for a quaternion-based approach.