Replication question

Hey, I have a question.

Working on a multiplayer game in which players can select an object to interact in various ways. I’m using the Get Hit Result Under Cursor For Objects on the controller and then sending that via RPC to the server.

My issue is I have no idea how to verify it on the server. Spoke to some people on discord and they suggested a line trace, but I don’t know how I would do a line trace on the server for a local player - can anyone suggest a way of getting around this? It’s a pretty meaty blocker for me at the moment.

Have the client send the information to the server to have the server recreate the client’s line trace. At minimum this would be the origin and direction of the trace ray. Then you can compare results and make sure they’re valid before allowing/moving forward with the interaction.

This is assuming that the interactable objects in your world are all replicated. If the case you’re dealing with is that the client has local objects that only it knows about, then verifying it on the server becomes more complicated and specific to your project.