I’ve been attempting to adapt the “advanced shadows” tutorial, and have been wrestling with a particularly odd problem. I seem to have discovered a solution–or at least a workaround–but I’m somewhat mystified as to why the difference in behaviour exists.
The problem that I was seeing was that the shadows produced appeared to move with the camera, as well as producing some artefacts that I don’t think that I apprehend sufficiently well to describe.
I eventually tracked the issue down to the fact that I was reparenting the camera to a “player” class in order to move it under player control. After a little bit of experimentation, I discovered that the problem seemed to stem from the fact that it was “base.camera” that I was reparenting, specifically; reparenting “base.cam” instead seems to produce stable shadows.
And yet, from what I’ve read, “base.camera” should just be a parent node of “base.cam”.
For the moment I’m switching to reparenting “base.cam” in my player classes, as my reading indicates that this is safe, as long as I don’t intend to have multiple cameras.
Still, this seems odd. What’s going on?