Follow Camera Moving Away When In Idle

Hello, i have been experiencing this issue for a while and it is kinda strange. I have the follow camera attached to the head and when i am not moving after 1-2 minutes i end up with the follow camera being offsetted. What is this, a bug, how can it be fixed?

Hi Xanadron,

Do you have an xinput controller plugged in? If so, try unplugging it. If you have the xinput controller plugged in when you start the editor, it tends to move the camera.

Maybe i have not been too precise, it moves the camera in a way that it is somewhat detached, more like floating away.

Can you show me your event graph for your blueprint? Is there any other script that could be causing the camera to move in the way you are describing or is all of your camera interaction done within the character/controller blueprint?

All is in the character blueprint. The camera doesn’t always move in a specific direction but one thing i have observed is that it seems to always stay parrallel to the ground. I do have an input that switches between two cameras but event with that off it is still happening, i’ll post a screenshot next time. This ‘‘bug’’ is very unpleasant and without resolving this i definitely cannot release the game.It’s not a big problem, from now, as i’m still developing and polishing the game. Also, something that is more distressing is the character shaking and tremorring and i thing this may cause the camera floating away. But the shaking only happens in one map (a very big one though). Looking forward to your reply, please let me know if you need a screenshot of anything.

If you can show me a screenshot of your camera and spring arm component detail’s panes as well as how you are controlling the camera in your character blueprint it may help narrow it down. I have a few ideas that may be causing what you are experiencing.

As you can see i don’t have the camera attached to the spring arm as it is causing other problems with the camera. The follow camera is attached on the head.

Hi Xanadron,

Do you have a sample project you would be willing to share? I’ll be happy to take a look and see if I can reproduce this on my end, as thus far I have been unsuccessful.

Hi, i would like to send you a private message regarding the link and some questions about the sample project, if it is possible. Thank you.

I have managed to grab some relevant screenshots of this issue:

You can send a message to me on the forums [here][1]. I will take a look once the project link has been uploaded.

[1]:

I have received the project. What steps do I need to take to recreate this error on my end?

Hi,

There are about 3 ways:

  1. Posses the character and let it in idle for 15-20 minutes, while also running the engine in the background. After that look to your body and see if the head is displaced.
  2. It would be the same as 1 but now put the character in sprint mode (you should see the FOV changing).
  3. Spawn the character a few meters up so it would make a roll but before he reaches the ground hold right mouse button so that he can aim (it’s really not supposed to aim like this, it just works for this map). You know when you’re shooting if left mouse button triggers a camera shake. Try running around and shooting randomly for about 2 minutes and again look down to see if the head is displaced. You can press H until the gun spawns in his hand so you can have a proper view when inspecting the camera’s displacement. Normally the gun should always be in the centre of the camera so if you see more of the right or left of the weapon, the camera is definitely offsetted.

If none of that worked try 1 again.

Hi Xanadron,

Unfortunately I have not see any errors on my end using the steps provided. Do you have any other steps I can take to reproduce this?

Hi ,

I haven’t run into this issue other then the steps i gave you. I assume it is something related to the engine or the maps i created. If it is possible, i would like you to tell me what are the other things that might produce this issue, as you said in your first comment.

What i suspect is causing this is one big map, the only map in which the character is shaking, which i think causes the camera to move away. I am going to also upload a video regarding the issue in the folder ‘‘UE4_Project’’, the one that i have shared it to you.

EDIT: The video is ready.

Hi Xanadron,

As stated in the private message on the forums, I believe that the error you are seeing is specifically tied to your camera being attached to the head bone of your character. It looks like the sway within the head bone is causing the camera to sway with it. Detaching the camera and hard setting it to a relative location roughly at head height should resolve this error.

I have the same issue with a first-person camera attached to a head bone. However, if I detach the camera and hard set it I will lose the “realism” of having it attached to the head bone (eg. camera movement when the head is moving like when breathing). How can I achieve camera movement tied to the player animation without this drift? This bug also seems to only occur on my “very large maps” similar to Xanadron.