I have set up the aim offset for my character and it works nicely on the client that controls the character. However, if I look at the character from a different client, the aim offset isn’t working. It’s as if the Pitch isn’t being picked up by the other client. Screenshot for better clarification:
Ok, so I think I’ve found out why this doesn’t work in my case with multiplayer, but it does in ShooterGame example.
ShooterGame example uses a c++ function that is exposed to BP. It’s code uses a function called GetBaseAimRotation(), which has in it’s definition this:
// If we have no controller, we simply use our rotation
POVRot = GetActorRotation();
// If our Pitch is 0, then use RemoteViewPitch
if( POVRot.Pitch == 0.f )
POVRot.Pitch = **RemoteViewPitch**;
POVRot.Pitch = POVRot.Pitch * 360.f/255.f;
Ok, so to close this problem, I finally solved it by using C++, by extending the Character class and reparenting my BP Character class to the new C++ extended Character class, to which I only added the GetAimOffsets function from ShooterGame’s character class.
The code for it is(in MyCharacter2.cpp):
No problem! I’m glad that I opened this thread so that people can see that there are still quite some things that blueprints don’t have access to and also how to solve this relatively important issue when it comes to multuplayer