# Relative location and rotation of Camera on Blueprint doesn't match the one showed on level editor

**URL:** <https://forums.unrealengine.com/t/relative-location-and-rotation-of-camera-on-blueprint-doesnt-match-the-one-showed-on-level-editor/557444>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [May 15, 2022, 2:54am UTC](https://forums.unrealengine.com/t/relative-location-and-rotation-of-camera-on-blueprint-doesnt-match-the-one-showed-on-level-editor/557444 "2022-05-15T02:54:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ping29](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ping29/32/88717_2.png) [@Ping29](https://forums.unrealengine.com/u/Ping29)\
**Post date:** [May 15, 2022, 2:54am UTC](https://forums.unrealengine.com/t/relative-location-and-rotation-of-camera-on-blueprint-doesnt-match-the-one-showed-on-level-editor/557444/1 "2022-05-15T02:54:17Z")

</div>

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:

```auto
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Camera")
	UCameraComponent* FirstPersonCameraComponent;

```

Here is the cpp code:

```auto
	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.

 ![temp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/0/0803ad96948139b6e0970d783f2cb39c19d51f5b.jpeg)

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.

---

<div class="post-metadata">

**Author:** ![Alexa.Ki](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/alexa.ki/32/562753_2.png) [@Alexa.Ki](https://forums.unrealengine.com/u/Alexa.Ki)\
**Post date:** [May 15, 2022, 3:01am UTC](https://forums.unrealengine.com/t/relative-location-and-rotation-of-camera-on-blueprint-doesnt-match-the-one-showed-on-level-editor/557444/2 "2022-05-15T03:01:41Z")

</div>

I think you have bad management of components and you should use only one camera for both 1st and 3rd person, transform the location/rotation when you switch to 1st person and restore when you switch to 3rd person… use timeline for the animation to make it smooth while switching and bp readonly things can’t be modify using bp…

**Try this**

```auto
UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Camera")
	UCameraComponent* FirstPersonCameraComponent;

```

---

<div class="post-metadata">

**Author:** ![Ping29](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ping29/32/88717_2.png) [@Ping29](https://forums.unrealengine.com/u/Ping29)\
**Post date:** [May 15, 2022, 5:47am UTC](https://forums.unrealengine.com/t/relative-location-and-rotation-of-camera-on-blueprint-doesnt-match-the-one-showed-on-level-editor/557444/3 "2022-05-15T05:47:22Z")

</div>

Thanks for the tip, I will give it a try.
