Im looking to set the value of y in the commented code cameraDir.y = 0;
to be the y = 0 plane of the camera after q or e is pressed in if (input._keys.a)
// if (input._keys.a) {
_R.copy(this._params.camera.quaternion);
if (input._keys.q) {
_A.set(0, 0, 1);
_Q.setFromAxisAngle(_A, 0.5 * Math.PI * timeInSeconds);
_R.multiply(_Q);
this._params.camera.quaternion.copy(_R);
}
if (input._keys.e) {
_A.set(0, 0, -1);
_Q.setFromAxisAngle(_A, 0.5 * Math.PI * timeInSeconds);
_R.multiply(_Q);
this._params.camera.quaternion.copy(_R);
}
_A.set(0, 1, 0); // over Y
_Q.setFromAxisAngle(_A, Math.PI);
_R.multiply(_Q);
controlObject.quaternion.copy(_R);
// }
// if (!input._keys.a) {
// cameraDir.y = 0;
// cameraDir.normalize();
// controlObject.quaternion.setFromUnitVectors(from, cameraDir);
// }