# FPSTutorial Camera Issue

**URL:** <https://forums.unrealengine.com/t/fpstutorial-camera-issue/374785>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, CPP, question\
**Created:** [October 29, 2016, 12:07am UTC](https://forums.unrealengine.com/t/fpstutorial-camera-issue/374785 "2016-10-29T00:07:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_5719ad0a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5719ad0a](https://forums.unrealengine.com/u/anonymous_user_5719ad0a)\
**Post date:** [October 29, 2016, 12:07am UTC](https://forums.unrealengine.com/t/fpstutorial-camera-issue/374785/1 "2016-10-29T00:07:14Z")

</div>

Hey,

I’m doing the FPS Tutorial

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

I was about to implement the AFPSCharacter Constructer to initialize a new Camera Component.

```
  AFPSCharacter::AFPSCharacter(const FObjectInitializer& ObjectInitializer)
       : Super(ObjectInitializer)
   {
       // Create a CameraComponent 
       FirstPersonCameraComponent = ObjectInitializer.CreateDefaultSubobject<UCameraComponent>(this, TEXT("FirstPersonCamera"));
       FirstPersonCameraComponent->AttachToComponent(GetCapsuleComponent, FAttachmentTransformRules::KeepWorldTransform);

FirstPersonCameraComponent->RelativeLocation = FVector(0, 0, 50.0f + BaseEyeHeight);

FirstPersonCameraComponent->bUsePawnControlRotation = true;
   }

```

When I compile and play I can’t move the camera up and down, only left and right.  
I also tried it with FAttachmentTransformRules::KeepRelativTransform and even the depracted AttachTo doesnt work.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5719ad0a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5719ad0a](https://forums.unrealengine.com/u/anonymous_user_5719ad0a)\
**Post date:** [October 29, 2016, 11:34am UTC](https://forums.unrealengine.com/t/fpstutorial-camera-issue/374785/2 "2016-10-29T11:34:03Z")

</div>

No one who have a idea?

---

<div class="post-metadata">

**Author:** ![coloko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@coloko](https://forums.unrealengine.com/u/coloko)\
**Post date:** [December 6, 2016, 2:53pm UTC](https://forums.unrealengine.com/t/fpstutorial-camera-issue/374785/3 "2016-12-06T14:53:06Z")

</div>

so this may solve you problem:  
[https://docs.unrealengine.com/latest/CHN/Programming/Tutorials/FirstPersonShooter/2/4/index.html](https://docs.unrealengine.com/latest/CHN/Programming/Tutorials/FirstPersonShooter/2/4/index.html)
