How to put extra distance between target and camera while retaining control target vector? (camera animation)

Try this:

            /*newX = node.geometry.attributes.translateEnd.array[node.hover * 3] * PLOT_RADIUS * 2;
            newY = node.geometry.attributes.translateEnd.array[node.hover * 3 + 1] * PLOT_RADIUS * 2;
            newZ = node.geometry.attributes.translateEnd.array[node.hover * 3 + 2] * PLOT_RADIUS * 2;*/
            

            point = new THREE.Vector3().fromBufferAttribute(node.geometry.attributes.translateEnd, node.hover).multiplyScalar(PLOT_RADIUS * 2);
            point.sub(CENTER_VECTOR);
            targetDistance = new THREE.Vector3().copy(point).setLength(desiredDistance);
            destination = new THREE.Vector3().addVectors(point, targetDistance).add(CENTER_VECTOR);


line 584

3 Likes