When working with three.js, I encountered a situation where I set the camera's focal point using camera.lookAt(0, 0, 0), but the camera's up vector ended up pointing in a random direction. I have a specific up vector in mind that I want the camera's up direction to align with, but when I try to set it using camera.up.set(), it doesn't seem to have any effect:
camera.position.set(0, 0, 5); // works
camera.lookAt(0, 0, 0); // works
camera.up.set(1, 0, 0); // nothing
camera.up.set(-1, 0, 0); // nothing
camera.up.set(0, 1, 0); // nothing
camera.up.set(0, -1, 0); // nothing
camera.up.set(0, 0, 1); // nothing
camera.up.set(0, 0, -1); // nothing
I'm wondering how to effectively change the camera's up vector. While using camera.rotateZ(0.1) works to some extent, it involves trial and error to find the right rotation amount. I would prefer to simply set the up vector directly.