Open linqen opened 1 year ago
@tranek is it possible to take a look at this? I think just looking at the code makes completely sense.
GetAvatarActor will return the same as GetOwner when the Owner is AvatarActor, but will also return the proper actor when Avatar != Owner
The current behavior of the example GameplayCueLocal functions is not working as it would do with a normal GameplayCue.
If we use GetOwner, the gameplay cue will always be executed sending the owner as "MyTarget", inside the GameplayCue.
In case our ASC lives on the PlayerState, and our Character is the Avatar, this will result on inconsistent behavior between executing the GC using this new function, and the normal Execute/Add GameplayCue
GetAvatarActor() instead of GetOwner() fixes this issue.
Check UAbilitySystemComponent::InvokeGameplayCueEvent to confirm that this is the default/expected behavior.