MultiCast function with strange behaviour
I try to make my crouch logic work on network too (for coop purposes). I use a server RPC and a multicast function. The multicast function is weird: it contains a Mesh->AddLocalTransform() function call and a CapsuleComponent->SetCapsuleHalfHeight() function call.
If I crouch with a client character in the viewport of another client I can see the effect of the SetCapsuleHalfHeight, but not the effect of the AddLocalTransform. They are called in the same multicast function.
asked Mar 29 '15 at 11:45 AM in Bug Reports
In the character blueprint you can set the Can Crouch boolean of the Character Movement component to true. If you do you can then call the Crouch() and UnCrouch() functions inside CrouchPressed() or CrouchReleased() respectively. You can find more information on the built in crouch functions Crouch() and UnCrouch() here: https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/ACharacter/Crouch/index.html
answered Apr 07 '15 at 08:29 PM
Welcome to the nightmare of the network realm :-))
I'm no pro so take it for what it's worth, but from my little experience, i have learnt not to trust multicast rpc. Plus, i have read (can't find where) that they are not meant to be reliable and hence should be used only for cosmetic purposes in your game (visual effects, etc.)
Maybe you could try to make the CharacterState a replicating variable with notification (ReplicatingUsing = OnRep_CharacterState), and put your modifications in the OnRep_CharacterState() function.
answered Mar 29 '15 at 12:01 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here