Attached Camera won't move since 4.9 update

Hey,

I’m having trouble to port my 4.8.3 c++ project to 4.9.
If I start it up in 4.9 (doesn’t matter if PIE, or standalone, etc) my camera which is attached to my player character won’t move anywhere. It’s just rooted in the middle of the map and doesn’t move if I move the character. However in 4.8 the attached follow-camera did what I want it to do: it moves smoothly around when the character is walking.
I did not change any c++ code or settings whatsoever, just opening this project with v4.9.

desired old behaviour (4.8.3) :
http://puu.sh/jWgAm/e316013f41.jpg

new behaviour (4.9):
http://puu.sh/jWgvc/2231b3ec5b.jpg

This is the way I deal with the attachement (in the character’s constructor) (like I said, it worked fine)

	defaultCameraPosition.Set(0, 0, 50);
	crouchedCameraPosition.Set(0, 0, defaultCameraPosition.Z + GetCharacterMovement()->CrouchedHalfHeight + 26);

	CameraArm = ObjectInitializer.CreateDefaultSubobject<USpringArmComponent>(this, TEXT("CameraArm"));
	CameraArm->TargetOffset = FVector(0.f, 0.f, 0.f);
	CameraArm->SetRelativeLocation(FVector(0.f, 0.f, 50.f));
	CameraArm->SetRelativeRotation(FRotator(0.f, 0.f, 0.f));
	CameraArm->TargetArmLength = 300;
	CameraArm->SocketOffset = FVector(0.f, 0.f, 30.f);
	CameraArm->bUsePawnControlRotation = true;
	CameraArm->bInheritPitch = true;
	CameraArm->bInheritYaw = true;
	CameraArm->bInheritRoll = true;

	FollowCamera = ObjectInitializer.CreateDefaultSubobject<UCameraComponent>(this, TEXT("FollowCamera"));
	FollowCamera->AttachTo(CameraArm, USpringArmComponent::SocketName);
	FollowCamera->bUsePawnControlRotation = false; // the arm is already doing the rotation
	FollowCamera->SetRelativeLocation(FVector(50.f, 0.f, 0.f));

	DefaultCameraPosition = ObjectInitializer.CreateDefaultSubobject<USceneComponent>(this, TEXT("DefaultCamera"));
	DefaultCameraPosition->AttachTo(CameraArm, USpringArmComponent::SocketName);
	DefaultCameraPosition->SetRelativeLocation(FVector(50.f, 0.f, 0.f));

	ShoulderCameraPosition = ObjectInitializer.CreateDefaultSubobject<USceneComponent>(this, TEXT("ShoulderCamera"));
	ShoulderCameraPosition->AttachTo(CameraArm, USpringArmComponent::SocketName);
	ShoulderCameraPosition->SetRelativeLocation(FVector(160.f, 70.f, 0.f));

Furthermore does playing the game with 2 clients crash the editor, whereas it was possible to play with multiple clients in 4.8.

Can someone help me with this?

Cheers
~Theo

big thanks to “rizu” on the irc.

It seems like this was just a broke blueprint (of my character) causing the springarm location to have a wrong value on the PIE start. Set it up again and now it works fine.

Attaching camera arm to your character mesh component should fix it for you.