Okay, I was browsing YouTube and stumbled upon this clip: Disney-Haunted Mansion-Behind the Scenes with Tony Baxter
The clip is not particualrly relevant but my daughter was over my shoulder and asked a question I hadn’t considered:
I understand how the effect is performed in general - a half-silvered mirror with the light brought up behind at the appropriate time and the “ghosts” moving in synchrony with the riders - but I don’t know the answer to her question.
Simple answer, they don’t. The ghosts are on a track just like you are. Just some of ghosts are not centered. You can tell this if you go on the ride when its very slow, and the “Doom Buggies” on either side of you are empty.
Now, this is true for Disney World in Florida, might not be true at any of the other parks, but I haven’t been to them, so wouldn’t know.