I am struggling with a scenario involving objects and a camera being controlled by a trackball. Whenever I add a new object to the main object, I want it to maintain its original orientation regardless of how the camera has moved around. For instance, without any camera rotation, a torus should appear with the hole facing the screen and the ring in the x,y screen plane.
My attempt to solve this problem involved using the inverse matrix of the camera, but unfortunately, that approach did not yield desired results.
var m = THREE.Matrix4()
m.getInverse(camera.matrixWorld)
obj.setRotationFromMatrix(m)
What could be causing this issue? Any help or insights would be greatly appreciated.