Hi! I’m having some trouble with using VideoTextures for a mirror in the BGE. There’s an attached file if you want to see how I have it set up.
The VideoTexture itself is fine. It works like a mirror should, except that the reflection lags. This is probably either because the reflection is rendered before the new object positions are calculated, because the reflection is rendered after the rasterizer renders everything else (including the previously rendered reflection), or because the rasterizer is rendering frames faster than the script can refresh the reflection. Or something. Trying to sort everything out in my head makes my brain hurt.
Does anyone know of a way to make sure the mirror is showing the current frame’s reflection? It’s ok if the FPS has to be reduced to make the logic, or whatever. I was just wondering if anyone had any ideas.
And just in case it helps to know, I’m averaging about 40 FPS. I suspect the problem will be harder to detect on computers with higher framerates. I ran the current game as a runtime, and the problem was present, but generally less noticeable.
EDIT: Does anyone know what order the Game Engine processes stuff in? I assume it’s logic, then physics, and then rendering, but I could be wrong. If figure it might help to know when in the pipeline the reflection gets rendered.
6508.blend (347 KB)