I am facing an issue with a Three.js Quaternion where I am struggling to preserve my object's property for the Quaternion.
GLmol.prototype.initializeScene = function() {
this.scene = new THREE.Scene();
this.scene.fog = new THREE.Fog(this.bgColor, 100, 200);
this.modelGroup = new THREE.Object3D();
this.rotationGroup = new THREE.Object3D();
this.rotationGroup.useQuaternion = true;
this.rotationGroup.quaternion = new THREE.Quaternion(0.7235552851867599, -0.004228243257681183 , 0.004646778667168487, 0.6902378421133389);
console.log(this.rotationGroup.quaternion)
this.rotationGroup.add(this.modelGroup);
this.scene.add(this.rotationGroup);
this.setupLights(this.scene);
};
The issue at hand is that when I define the this.rotationGroup.quaternion = new THREE.Quaternion(), it fails to retain the Quaternion object. The output shows:
THREE.Quaternion (w:1 x:0 y:0 z:0)
What could be causing this behavior?