tween camera movement around globe three.js and tween.js

I.m trying to get a camera to smoothly rotate around a globe to a new position when a button is pressed. I’be done proof of position with the following to check the coordinates are OK

camera.position.set(posX,posY,posZ);
camera.lookAt(new THREE.Vector3(0,0,0));

However when I do the following to try to get it to tween nothing happens. Seems the .onupdate isn’t being called and I can’t figure out what I’ve done wrong. I’ve been looking at this for a while now and can’t get it to work and am really struggling.

var from = {
        x : camera.position.x,
        y : camera.position.y,
        z : camera.position.z
      };

      var to = {
        x : posX,
        y : posY,
        z : posZ
      };
      var tween = new TWEEN.Tween(from)
      .to(to,600)
      .easing(TWEEN.Easing.Linear.None)
      .onUpdate(function () {
        camera.position.set(this.x, this.y, this.z);
        camera.lookAt(new THREE.Vector3(0,0,0));
      })
      .onComplete(function () {
        camera.lookAt(new THREE.Vector3(0,0,0));
      })
      .start();

Any help gratefully received

Hi, Bob!
Unfortunately, I’m not too familiar with both of these libraries to be able to help you out :frowning:

As for some troubleshooting steps, does the tween actually apply? In other words, can you see the camera moving to your new position?

Cheers!
Kirupa