I’m so close to having this rotation problem fixed but it’s not replicating to the clients
Here is a video of my code / problem
I also have another version i did which works almost perfectly but it doesn’t have the rotation in, here is that example:
so technically i have this working separately but getting them to work together is making me want to kill kittens…
Any help guys, i would really appreciate it
No suggestions guys? must be a way
Actually I’m close as well. It’s turning and rotating and takes care of the 70° for yaw on every client but I’m not 100% happy with it because it does not look 100% smooth on the client that is owning the controller (it’s looking smoother on server and a 2nd client who is not the owner). I thought I had it (and it was looking smooth - either on server and one client) but after starting a 2nd client (so 3 players) I found out that it did not really replicate everywhere as I thought at first. Only the client and the server worked as expected… but a further 2nd client did not get it for whatever reason. Pretty annoying. My current state is… I putted pretty much the same code from your first video into a function that is called after InputAxisTurn in the ThirdPersonBlueprint if combatmode is set and yet again additonal via authority switch the same function again from an custom event (only on) server (so all are running it but multicast did not work yet again for some reason and I’ve no clue why)… and afterwards I call a further function that contains pretty much the same code that was previously in the anim blueprint (minute 4:00 UE4 #6 Using Aim offset with Unreal Engine 4 - YouTube). To get Pitch im using something similar like done here: Why is the AimOffset not replicating? - Blueprint - Unreal Engine Forums
It seems many stuff is replicated and/or at least the server knows already anyway (so 1 server + 1 client worked already while 2 clients did not). GetBaseAimRotation could be used in anim blueprint to get an already replicated (and turned around) AimPitch. So I only need to replicate Yaw from GetControlRotation (because AimYaw in AnimBP is built form delta of GetControlRotation and GetActorRotation). GetActorRotation is already fine but I found no way to GetControlRotation Yaw without replicating a variable so I could use Pitch from that function (instead to GetBaseAimRotation) as well and run the stuff that is shown in Minute 9:00 https://www.youtube.com/watch?v=dnX5oDJujCA in a function once for the client itself and once again (if remote) on the server (no multicast just run on server). I’ve put back pretty much everything as in the original (linked) turtorial in the AnimBlueprint again and asking with a Select via IsLocallyControlled if I use the ControlerYaw from that replicated stuff or via GetControlRotation now. The only stuff which I’m not 100% happy now is the replicated GetControllerRotation. It’s finally looking smooth but it seams a bit heavy (fired pretty often) and I’m not sure if this is really necessary or if there is some similar built in function as GetBaseAimRotation to get more lightweight replicated GetControlerRotation Yaw as well.