Solving Line Trace Jitter


What is your code for line trace?

What happens if for testing, move the camera a little further forward, in front of the players head, or put an Arrow on character and run line trace from there?

I have been using the 3rd person template for my character and used this from the docs to get the in the center of the players screen: . It works fine why you are still or walking forward, but if you move to the side or walk backwards the trace will oscillate horizontally each frame (it is on a tick function). Even when it is a client side (or server side…just not as extreme) trace this still happens.
This is the camera I am tracing from. Why would it be doing this?

Neither will change anything. They will both have the same issue. I’m thinking it might even be an issue with the third person character itself.


Give me a sec, will play with 3rd player.

My code off event tick

This is how it reacts for me


Using the player camera manager worked, it even fixed another problem I had on client side trying to do traces from other players, they really didn’t need to know what other players are looking at. But it did break some server side stuff. Now the server player is the only one who can use the trace to interact.
That looks something like this: Player hits key → send command to server → server traces using that same trace function → server uses interface to communicate with hit .

Right now only the server can interact with anything, I’m guessing that has something to do with the player index parameter.

I cheated and made to separate functions, one for the old method that I used for the server trace and the one you gave me for the clients. It works out great!


Glad it helped, no idea about server stuff. Post a new one about it.

Thank you, you save my and nerves