Multiplayer Control Rotation - mklabs/ue4-targetsystemplugin GitHub Wiki
This plugin has a built-in feature which lets you control the rotation of the character when a target is locked on. Unfortunately, it doesn't work on replicated client in a multiplayer setup.
Here is a blueprint solution which uses events exposed by the plugin, OnTargetLockedOn
and OnTargetLockedOff
.
Make sure to disable the option ShouldControlRotationWhenLockedOn
in the TargetSystem component.
This solution relies on both of these plugin events which then call RPCs blueprint events:
- ServerControlRotation: is set to replicated on server, and calls the multicast version.
- MulticastControlRotation: is set to replicated as multicast, and does what the plugin does when
ShouldControlRotationWhenLockedOn
is enabled. That is settingUseControlRotationYaw
and character's movementOrientRotationToMovement