I need to change the projection matrix and I believe that can be found in ViewMatrices.ProjMatrix of an FSceneView instance. How do I get a hold of said instance, or if there is a better way of changing the projection matrix I’d love to hear it. Thanks in advance
I have found a bit of code on one of the other threads that gets the SceneView as follows:
ULocalPlayer* LocalPlayer = (ULocalPlayer*)Player;
if (LocalPlayer != NULL && LocalPlayer->ViewportClient != NULL && LocalPlayer->ViewportClient->Viewport != NULL)
{
FSceneViewFamilyContext ViewFamily(FSceneViewFamily::ConstructionValues(
LocalPlayer->ViewportClient->Viewport,
GetWorld()->Scene,
LocalPlayer->ViewportClient->EngineShowFlags).SetRealtimeUpdate(true));
FVector ViewLocation;
FRotator ViewRotation;
FSceneView* SceneView = LocalPlayer->CalcSceneView(&ViewFamily, ViewLocation, ViewRotation, LocalPlayer->ViewportClient->Viewport);
SceneView->ViewMatrices.ProjMatrix.SetIdentity();
}
As you can see I’m setting the projection matrix to identity (for experimental purposes) on every tick, however the ProjMatrix is always reset to the default projection by the time the next tick happens. Is there any way I can set the projection matrix at the source where it stays changed