GameplayCameras Plugin Bug : AGameplayCamerasPlayerCameraManager, FActorCameraEvaluationContext
When using a PlayerController whose CameraManager is a GameplayCamerasPlayerCameraManager, the FOV does not apply correctly when setting a CineCameraActor as the ViewTarget via SetViewTarget.
It gets applied using the FOV value corresponding to a focal length of 35, It should be applied using the FOV value calculated by the CineCameraActor.
Check the values directly through the Pose Stat in the Camera Debugger.
This appears to occur because FocalLength is not adjusted to be less than 0 when ApplyMinimalViewInfo is called in FActorCameraEvaluationContext. When using a CameraRig, the issue doesn’t occur because CameraPose is lerped and ends up using -1.
//ActorCameraEvaluationContext.cpp line 66
void FActorCameraEvaluationContext::ApplyMinimalViewInfo(const FMinimalViewInfo& ViewInfo, FCameraNodeEvaluationResult& OutResult)
{
FCameraPose& CameraPose = OutResult.CameraPose;
CameraPose.SetLocation(ViewInfo.Location);
CameraPose.SetRotation(ViewInfo.Rotation);
CameraPose.SetFieldOfView(ViewInfo.FOV);
// I Added This Line To Fix Bug
CameraPose.SetFocalLength(-1.f);
CameraPose.SetNearClippingPlane(ViewInfo.PerspectiveNearClipPlane);
CameraPose.SetSensorWidth(CameraPose.GetSensorHeight() * ViewInfo.AspectRatio);
CameraPose.SetAspectRatioAxisConstraint(ViewInfo.AspectRatioAxisConstraint.Get(CameraPose.GetAspectRatioAxisConstraint()));
CameraPose.SetConstrainAspectRatio(ViewInfo.bConstrainAspectRatio);
if (ViewInfo.PostProcessBlendWeight > 0.f)
{
OutResult.PostProcessSettings.LerpAll(ViewInfo.PostProcessSettings, ViewInfo.PostProcessBlendWeight);
}
}