# Why is my camera moving the wrong way?

**URL:** <https://forums.unrealengine.com/t/why-is-my-camera-moving-the-wrong-way/364545>\
**Category:** Cinematics & Media\
**Tags:** unreal-engine, UE4, CPP, question\
**Created:** [July 20, 2016, 2:29am UTC](https://forums.unrealengine.com/t/why-is-my-camera-moving-the-wrong-way/364545 "2016-07-20T02:29:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimmyFitzimmons](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JimmyFitzimmons](https://forums.unrealengine.com/u/JimmyFitzimmons)\
**Post date:** [July 20, 2016, 2:29am UTC](https://forums.unrealengine.com/t/why-is-my-camera-moving-the-wrong-way/364545/1 "2016-07-20T02:29:15Z")

</div>

I realize you’ll probably want to see my code, but I want to see if anyone has had this same issue and might just know what I need already. Basically, I’ll be working for a bit and everything will be working fine, and then suddenly one time when I run the level, my camera moves in the wrong directions. It’s a top-down camera like you would typically see in a strategy game (ie. XCOM) so it uses WASD to move up/down/left/right. Like I said, it will work fine for a bit and then out of nowhere it will start going the wrong way. Restarting Unreal fixes the issue temporarily. At first, the directions were simply inverted, but now it goes in strange, seemingly arbitrary diagonal directions. This is for a class project; any help would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![calembendell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@calembendell](https://forums.unrealengine.com/u/calembendell)\
**Post date:** [July 20, 2016, 5:32am UTC](https://forums.unrealengine.com/t/why-is-my-camera-moving-the-wrong-way/364545/2 "2016-07-20T05:32:52Z")

</div>

99% sure we’re going to need to see the code for this one! 😃

---

<div class="post-metadata">

**Author:** ![JimmyFitzimmons](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JimmyFitzimmons](https://forums.unrealengine.com/u/JimmyFitzimmons)\
**Post date:** [July 21, 2016, 10:36pm UTC](https://forums.unrealengine.com/t/why-is-my-camera-moving-the-wrong-way/364545/3 "2016-07-21T22:36:15Z")

</div>

This is the tutorial I used to make my camera:

> **[RTS Camera C++](https://forums.unrealengine.com/showthread.php?87350-RTS-Camera-C)**
>
> Hi, this mini tutorial is the extension/rework of the RTS camera code you can find at the Wiki. It contains hopefully all the usual camera and keyboard movement and rotation features you may need. After you created a new C++ project (call it RTS...

My code is nearly identical, all I did was use my own variable names. It will also help to mention that today I ran the project as an executable and everything works perfectly; I only get this problem while running in the editor itself. It’s also not just the movement angles that are wrong, it actually moves the camera from its normal starting point as well. If I notice anything else going wrong I’ll add another comment. It’s really annoying having to either deal with this or wait for it to build the executable to test properly.

---

<div class="post-metadata">

**Author:** ![CrimsonHawk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CrimsonHawk](https://forums.unrealengine.com/u/CrimsonHawk)\
**Post date:** [July 22, 2016, 1:51am UTC](https://forums.unrealengine.com/t/why-is-my-camera-moving-the-wrong-way/364545/4 "2016-07-22T01:51:21Z")

</div>

Isn’t the directions are fixed to something rotating? Like your player character? Are you sure you are using the World’s coordinate system?
