I am facing an issue while trying to animate the lookAt method of an Object3D to face a target Vector3. I am using a Tween function that changes floating points based on the scalarMultiplyVal (ranging from 0.0 to 1.0). However, no matter what approach I take, the Object3D is already looking at the target before the tween animation initiates, which doesn't make sense.
TweenMax.to( this, 5, {scalarMultiplyVal:1, onUpdate:function(){
let targetVector = new THREE.Vector3( target.position.x, target.position.y, target.position.z ).multiplyScalar( scalarMultiplyVal );
console.log( targetVector ) // logs "animating" x,y,z values as expected
displayObject.lookAt( targetVector ); // does not animate. Already fully looking at target.position ( scalarMultiplyVal = 1.0 )
}});
My goal is to smoothly transition my Object3D to align with a new vector3 periodically, but it seems like the Object3D is fixedly gazing at the target.position despite the vector multiplication operation being disregarded. Any insights or suggestions would be greatly appreciated!