SceneCaptureComponent2d gap issue

Hi everyone.

I wanted to ask for help because I have a problem with USceneCaptureComponent2D. I used it to create a portal. And everything looks good, but if I move the camera quickly there is a gap.
This is how I calculate scene component camera location and rotation:

And projectile matrix:

Maybe someone has encountered this and can give a hint.

The problem can be seen in the video. Monosnap

Thanks.

I believe what you are seeing is caused by the fact that the SceneCapture2D’s output is always going to lag 1 frame behind the game’s current render frame. I think you would need to somehow force the SceneCapture2D to do its render before the player camera does its render. However, I don’t know enough about how to hijack UE’s render loop to suggest a fix, but maybe knowing this root cause will help in your search for a workaround?

The problem was in frame synchronization. I used
PrimaryActorTick.TickGroup = ETickingGroup::TG_PostUpdateWork
and it solved the problem.
Thanks!

The problem was in frame synchronization. I used PrimaryActorTick.TickGroup = ETickingGroup::TG_PostUpdateWork and it solved the problem. Thanks!