Camera problems after upgrading to 4.5

I reinstalled 4.5 again from the latest code from the 4.5 github branch and the templates don’t seem to have that problem anymore, but unfortunately my game’s project still does. I’m opening the editor using my project’s visual studio solution. DXdiag

I did some tests and it appears to be related with socket attached cameras. I did the following:

  • Created a blueprint third person template
  • Added a socket to the skeleton called Camera that derives from head and is placed between the eyes called camera
  • Removed the camera boom and set the follow camera’s parent as the capsule collider and checked the Use Pawn Control Rotation.
  • For the BeginPlay of the character i attach the follow camera to the Camera socket with the mesh as parent and Snap to target attach type.
  • On the Tick event for the character i print it’s base aim rotation.
  • Press play and look all the way down or all the way up, the Yaw values of the base aim rotation should go haywire.

I was able to follow the steps and saw the same behavior. In your own project, do you still have the problem happen if you use a camera boom rather than attaching the camera to a socket?

He stills twitches sometimes in completely different directions, but it’s considerably better. I also tried just with the camera attached to the root component and it also has a few twitches. The problem is that i need the camera to be attached in the eyes of the third person mesh, so it responds to movements of the character with whatever animation he’s playing. This was working in 4.4, so something must have changed in the engine that triggered this problem.

Hey -

Are you still having the problem of the camera behaving oddly when playing? How is your camera attached to the skeletal mesh and how is it controlled? Does controlling the camera have any effect on the mesh itself? Let us know if you can think of any other information that could help determine what exactly is happening.

Cheers

Yes i’m still having the problem with the latest commit on the 4.5 branch. I attach my camera using:

Camera = PCIP.CreateDefaultSubobject<UCameraComponent>(this, TEXT("Camera"));
	Camera->AttachTo(Mesh, "Camera");
	Camera->bUsePawnControlRotation = true;
	Camera->bUseControllerViewRotation_DEPRECATED = true;

The mesh rotates when i use the Mouse X and the aim offset works when i use Mouse Y. The only thing i can think of is just the socket attachment on those kinds of angles got broken on 4.5 :stuck_out_tongue:

Hey -

In 4.5 the view angle limits changed from 89.9 to 89.99 which normally doesn’t cause any issues, but may be causing a loss of precision with the camera attached to the socket which is why the camera goes crazy. My suggestion would be to try limiting the pitch limits to a slightly lower angle.

Cheers

I’ve overridden the ViewPitchMin and ViewPitchMax on the PlayerCameraManager to the previous values and it’s working now. Thank you very much for not giving up on me :slight_smile: