Server is not getting client value for aiming when hit. (Multiplayer using listen server)

Hello All,

This is the issue just don’t know how to fix it. These are from the same shot/input. Client side is right and I just want that value replicated on the server side.


Context
I am trying to make a minigolf game as my first real project and I am having some issues with replication. Listen server works perfectly, but client can only shoot straight. I am aiming using the camera vector, but it keeps getting a server value of yaw 179.9999 and does not update after it spawns. It wont let me shoot anything but straight on the client side. I cant figure out how to update the server with the client variables.

I feel like I am missing something super simple, but not really sure what how to troubleshoot anymore. Even went back to earlier versions of my project just to make this easier to figure out, but I am pretty stuck at this point. (I am running some events on server, but clearly wrongly because it is not working)

Shooting mechanic.

rebuilt a simple shooting mechanic and it gives me the same result.

Hey @Schafz !

Looks like the camera rotation is not being updating in the server.
The easy way to check this is printing the camera (only in the server) and make some moves.

Are you using the third person character for this project? Remember the inputs of the control are not being replicated. You need to pass the direction of the server.

(In First person shooters you can use the forward of the character because the rotation of the character is being replicated and match with eh forward of the camera.)

Easy way to do is sending a RPC to the server adding the rotation as a parameter the hard way is to update the rotation of the camera in the server.

THANK YOU!!! I really appreciate you so much. I have been messing around with this for the last 2 weeks and haven’t been able to make any progress.

For anyone who also is having this problem. I am going to post the pictures of what I did that work.

In order to set this up you need to set up a RPC. Here is a picture of my RPC as an example

This is how I incorporated into the shooting mechanic

Pitch, Yaw and Roll are already passed to the server. There’s no need to open a cheat point and allow clients to pass their own values.

On the server you use the camera manager for camera location. For Pitch, Yaw and Roll you use either Base Aim Rotation or Control Rotation.

For added info, Simulated Proxy camera components are not updated. They’re pointless in many regards. I actually remove them along with any interactive components.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.