The sphere rotates along the world axis, everything looks fine until the camera starts to rotate around sphere. When the camera moving, the rotation of the object will continue along the world axis and it looks weird. How to consider the direction of the camera when rotating a sphere and make the rotation always the same?
I found how to get camera direction:
camera.getWorldDirection(vector);
And how to rotate the object by the camera direction:
quaternion.setFromAxisAngle(vector, angle);
object.quaternion.premultiply(quaternion);
But I don’t understand how to rotate this direction axis vector to rotate the object along the x or y axis.