How to keep mesh attached to camera from jittering?

I’ve got a weapon mesh that I’m trying to attach to the camera for a first person view. It’s a skeletal mesh, currently with no animations, no physics body, no collision, and not simulating physics.

In BeginPlay, I get the TransformComponent of the player camera manager and I attach my mesh to that component. But I’m getting the jittering effect you can see in this video (look especially toward the bottom). There’s no jitter when moving laterally. Only when rotating the camera. Any ideas how to stop the jittering?

It’s hard to see from the video, but this could be tick-order issue between the character and the camera.

If you’re already using C++, I suggest looking at the ShooterGame template on the Launcher to see how you would handle this. The gist of it is that you override UpdateCamera() in your own camera manager class, then feed the camera transform back to the players’ pawn.

The pawn will then update the transform of the first-person mesh to be relative to the camera. UpdateCamera() is called to process camera adjustments like camere shake and camera animations, so it’s safest to do it from there when you know the camera transform will be up-to-date.

also how far away are you from world origin? looks like precision movement errors.

Jamsh is probably right, you are attaching objects to camera and the correct method is to attach the camera to objects instead.

Thank you both very much! It did end up being a floating point precision issue. I was indeed very far away from the world origin. I had forgotten that I moved this test platform way over there when testing out some terrain. Very grateful that you spotted that.