通过重写LocalPlayer的CalcSceneView函数实现
FSceneView* UFreezeCameraLocalPlayer::CalcSceneView(class FSceneViewFamily* ViewFamily, FVector& OutViewLocation, FRotator& OutViewRotation, FViewport* Viewport, class FViewElementDrawer* ViewDrawer /* = NULL */, EStereoscopicPass StereoPass /* = eSSP_FULL */)
{
if (bUpdate)
{
return Super::CalcSceneView(ViewFamily, OutViewLocation, OutViewRotation, Viewport, ViewDrawer, StereoPass);
}
else
{
FSceneView* temp= Super::CalcSceneView(ViewFamily, OutViewLocation, OutViewRotation, Viewport, ViewDrawer, StereoPass);
temp->bCameraCut = true;
return nullptr;
}
}