Hi, I am new to Unreal C++ programming and UE4 Editor, When I modify the location and rotation of my second charcater camera on Blueprint Editor, I found the location and rotation mismatch when I switch change back to level editor view.
Here is the header code:
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Camera")
UCameraComponent* FirstPersonCameraComponent;
Here is the cpp code:
FirstPersonCameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("FirstPersonCamera"));
FirstPersonCameraComponent->SetRelativeRotation(FRotator(-265.0f, -70.0f, 60.0f));
FirstPersonCameraComponent->SetRelativeLocation(FVector(-2, 1, -80.0f));
FirstPersonCameraComponent->SetupAttachment(Mesh3PComponent);
And then in Blueprint Editor, move the camera to character head, click the compile and save, finally go back to Level Editor, find out the relative location and rotation between the 2rd camera and character doesn’t match.
As you can see, the 2rd camera was attached to character head in blueprint editor, but now it goes above the character head in level view. Does anyone know how to solve this issue?Thanks.