Developing a 3D shooter on ThreeJS. The weapon rotates along the Y axis depending on the direction of the camera. You also need to turn it up and down, depending on whether the camera is looking up or down. What proper formula should be?
weapon.rotation.set( controls.getObject().rotation.x, controls.getObject().rotation.y - Math.PI, controls.getObject().rotation.z );