Also @gherkinboy, definitely check the developer console for any errors in red! when you hit problems like this. I think this issue would have probably appeared in the console output.
Ah, good advice. Checked the developer console and I was missing “new” before textMesh. And I had to reposition the camera to see the text. Thanks a bunch!
Did it a couple of times in very specific cases, as camera doesn’t need to be a part of the scene graph
What’s the advantage of this approach here and in general? No kidding. Now I doubt if I did it correctly all the time
If its not in the scene graph, its matrix/matrixworld doesn’t get autoUpdated during render traversal.. so if you change camera.position for instance.. it might not get reflected during render. Things like OrbitControls explicitly deal with it internally, and I don’t know for sure if this is still an issue.. but it’s bitten me a few times before.
In general, if you want to programmatically control the camera in a VR session, independent camera will not work, because it will get updated from the VR headset. So, the camera is placed in user-defined Object3D (which is a child of the scene) and this object is moved programmatically. Thus you control the outer object, while the VR headset controls the inner camera.