I'm currently working on a threejs project and I have encountered an issue with rotating a plane using tween. The problem is that the tween always starts at 0, despite having the correct initial value (a) when checked in the console.
For instance,
When I attempt to create a tween from 40 to 60, the code seems to be disregarding the starting point and going from 0 to 60 instead.
a = {rotationY:plane.rotation.y};
b = json["rooms"][currentRoom]["camera"]; //{"rotationY":60}
var tween = new TWEEN.Tween(a)
.to(b, 500)
.easing( TWEEN.Easing.Quartic.Out )
.onUpdate(function(){
plane.rotation.y = (this.rotationY*2*Math.PI)/360;
});
tween.start();