Line trace blueprint for multiplayer

Found same question in the forum but i dont understand how its solved since im new at unreal.
https://answers.unrealengine.com/que...on-client.html

Im using the basic Linetrace graph you can find on youtube tutorials, in the editor i swtch to 2 players, and run as listen server.

Server works fine, line trace hits where the camera/hud is placed.
On client line trace is always horizontal line even if the client camera is looking up

Edit: the linetrace is running from a rn on server custon event, i think its taking the server camera and not the client, but i dont know how to fix this

still need help here :frowning:

still trying to solve this, help :frowning:

Edit: the linetrace is running from a
rn on server custon event, i think its
taking the server camera and not the
client, but i dont know how to fix
this

Hi, if you run this on the server pawn, then it will use the camera from the server pawn. If you run this on the clients pawn (even if the server is executing the logic), then it will use the camera of the clients pawn.

Of course the server won’t magically update the current location and rotation of the clients camera on its own…

You can use “BaseAimRotation”, that’s something the server automatically knows about.