I previously had a reliable method for obtaining the x position of the camera along a path. However, upon checking the console, it seems that the method is now deprecated. Therefore, I am in search of updating my functions with a newer approach.
The method I was using before was camera.matrixWorld.getPosition().x
Now, utilizing getPositionFromMatrix, how can I retrieve the x value of the camera position?
I attempted the following approach, but unfortunately, it did not yield the desired result:
var thisvect = new THREE.Vector3();
thisvect.getPositionFromMatrix(this.object);
var thisx = thisvect.x;
Additionally, I also tried the following method which also did not work as expected:
var thisvect = new THREE.Vector3();
thisvect.getPositionFromMatrix(this.object);
var thisx = thisvect[0];
Thank you.