root is a moving object. the camera moves with it.
then somewhere else i wrote
base.camera.reparentTo(render)
the camera didn’t change position.
I did this just to try it out. It’s weird.
The way i see it is that once you assign a parent to the camera you can’t change it unless you add some other code.
Right?
I think maybe like rdb said, that your camera is positioned at 0,0,0; when you attached that to a moving node the camera view results are transformed by the moving node’s transform, if you then remove your camera that has its own transform ( still pos at 0,0,0 ) and attach it to another node, it will only be transformed by that new parent’s transformation matrix.
Transformation matrices will combine down the family tree.
If you want your camera to remain where it was last when attached to the moving node, I think you need to camera.setPos(root.getPos()); that is if you are reparenting to render which is positioned at 0,0,0