# Argh! Separate camera and player controls

**URL:** <https://forums.unrealengine.com/t/argh-separate-camera-and-player-controls/343805>\
**Category:** Cinematics & Media\
**Tags:** controls-mapping, unreal-engine, question, CPP\
**Created:** [January 12, 2016, 7:48am UTC](https://forums.unrealengine.com/t/argh-separate-camera-and-player-controls/343805 "2016-01-12T07:48:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon68109364](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon68109364](https://forums.unrealengine.com/u/anon68109364)\
**Post date:** [January 12, 2016, 7:48am UTC](https://forums.unrealengine.com/t/argh-separate-camera-and-player-controls/343805/1 "2016-01-12T07:48:25Z")

</div>

Hi all, excuse the frustrations, I have been looking and playing with various solutions all day so think I should turn to the experts.

I am using the c++ side scroller template. This provides me with a player controller, which has a boom camera attached to follow the player. All I want to do is separate the player and camera.

- control the camera with the mouse/VR (only pitch and yaw). The camera sits in one spot.
- continue to control the player with the gamepad/keys.

From some lengthy time searching and reading, I went with the idea of a separate pawn for the camera. This is setup and works as intended when I assign it’s controls to Player0 - but that overrides my Character controls.

My problem is now in understanding what to do next clearly.I feel at this point I am really stabbing in the dark and should seek some guidance.

- Is this a good way to separate them?
- How can I allow both the Character and Pawn to continue to recieve inputs?
- How can I now assign (c++) my newly created camera as the main camera in my game?
- Do I do this in the gamemode class or the camera class?

Cheers

---

<div class="post-metadata">

**Author:** ![anon68109364](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon68109364](https://forums.unrealengine.com/u/anon68109364)\
**Post date:** [January 12, 2016, 10:35am UTC](https://forums.unrealengine.com/t/argh-separate-camera-and-player-controls/343805/2 "2016-01-12T10:35:27Z")

</div>

I seem to be finding I will need a second PlayerController, and assign that to my camera pawn, essentially having two players.

So I have set the pawn to be controlled by player 2, then set the camera as the main camera for player 1:

> **[How do I make a CameraActor my main camera?](https://forums.unrealengine.com/questions/24952/wisdom-request-disembodied-static-scene-camera-in.html)**
>
> Hi Guys, For first off, I’ve spending good part of a week and bit rummaging through Unreal. I’ve built source and gone through examples, looked through docs, did some programming etc. My main background is from Unity side of things(6 years or...

I do not think doing it this way will work as I am not ‘really’ player 2, I am always player 1.

I might try just adding in input to the class via blueprint and seeing if I can get around it. I would prefer to use c++ so hopefully if I succeed with blueprints I can convert that to the c++ equivalent…

---

<div class="post-metadata">

**Author:** ![anon68109364](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon68109364](https://forums.unrealengine.com/u/anon68109364)\
**Post date:** [January 12, 2016, 10:53am UTC](https://forums.unrealengine.com/t/argh-separate-camera-and-player-controls/343805/3 "2016-01-12T10:53:13Z")

</div>

Totally stuck!..so it seems the simple approach I was trying is not going to work, so the original question still stands…any help?

If no one can help within a day or 2, I will go back to leaving the camera in the original player class, and just position it in the scene where I want it. I really wanted them separated though…

---

<div class="post-metadata">

**Author:** ![Ryan\_Darcey](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryan\_Darcey](https://forums.unrealengine.com/u/Ryan_Darcey)\
**Post date:** [January 12, 2016, 5:58pm UTC](https://forums.unrealengine.com/t/argh-separate-camera-and-player-controls/343805/4 "2016-01-12T17:58:26Z")

</div>

Can you post code or Blueprint screenshot of your movement & look input handling?

---

<div class="post-metadata">

**Author:** ![anon68109364](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon68109364](https://forums.unrealengine.com/u/anon68109364)\
**Post date:** [January 12, 2016, 8:42pm UTC](https://forums.unrealengine.com/t/argh-separate-camera-and-player-controls/343805/5 "2016-01-12T20:42:01Z")

</div>

I decided to put the controls back as they were, all under the 3D scroller character class. For the game I have I will only use single player anyway.  
Ideally I would have liked to separate the ‘VR’ mouse component, but at the end of the day, at worst - I can extend a blueprint of my c++ class to handle all the selection done via VR. At best - do it all in code.
