Download

How do I replicate pitch input (no blendspace)?

Hi,

this a question I posted on AnswerHub a few days ago (How do I replicate pitch input (no blendspace)? - UE4 AnswerHub). I still didn’t get no answer and I’m pretty much stuck without it. I would be very thankful for any help :slight_smile:

"I’m trying to replicate pitch input over a networked game. For now, only the rotation of the player is being replicated. I tried these setups:

None of them work. Please note that I’m not using blendspace, but simply put the gun as a child of the FirstPersonCamera:

And it actually works it singleplayer!

I read a few posts regarding this issue but most of them involve using a blendspace. Is it possible to replicate pitch input without it? If so, how?"

Any suggestions are very much appreciated!

In your character blueprint properties, make sure “Use Controller Rotation Pitch” is enabled, then it should replicate just like the yaw.

EDIT:
Actually that would make the whole character rotate (which I’m assuming is not what you want :p) so here is a way you can replicate the camera rotation.

(Also you should disable “Use Controller Rotation Pitch”.)

Hey, thank you so much for the quick reply! It works flawlessly :o !
But I’m really confused now. I watched the whole “blueprint networking” series by Epic, but it looks like I still don’t understand how the “switch has authority” is supposed to work.
Game5.PNG
I thought it stops the execution of the blueprint if the owner is “remote” (in this case - not the server). Why does the client get to the “Multicast Replicate Rot” event, even though he’s not the authority? Could you please explain that to me?

EDIT: For example, this part of my blueprint doesn’t work as intended (only the server can execute, what’s after the event):
launcher.jpg
I noticed that the Event doesn’t have “Execute on all” written in it’s description and I don’t know how to enable that. Any suggestions?

Simply put: Authority does not (always) equal server :slight_smile: it’s a common beginner mistake to think Authority/Remote as Server/Client but there is a reason we use the term Authority instead of Server :stuck_out_tongue:

In this case, the client has network authority over the pawn it controls.

(I’m probably not the best guy to explain this stuff :p)

That’s interesting. What you said has been said in the video as well, but it sadly wasn’t explained further. I’m really thankful for your help, but I’d like to ask you for one last piece of advice. How would you handle the issue I stated in my post above? Until now I was using a “workaround”. I experimented for some time and a configuration like this worked for the most part:


This way both the server and the client and the server see the shot being fired. I used this “config” (two custom events - one set to “multicast” and one “run on server”) a few times, but I have a feeling this is not the right way to do it… So if you have some tipps, that’d be great :slight_smile:

Very good answer, this question appears everywhere but answers usually do something bad, this works perfect! Thanks

I made a tutorial series on fps multiplayer shooter and there I addressed this pitch replication problem i this episode, here is the link to the video.