Lyra pawn switching for photo mode feature

Hello,

We are building our project on top of Lyra and are currently looking at implementing a photo mode for our game but are running into some issues regarding the ability system and its state in relation to pawn possession.

Our main issue is switching to a new pawn within the lyra framework, we are using the lyra ability system component that lives on ALyraPlayerState.

This provides us the flexibility of having abilities independent from the pawn but the downside here is that all abilities will be transferred once we possess another pawn.

An option could be to clear all abilities from the player state and regrant / activate them again when we exit the photo mode and repossess the main character pawn.

The issue for a photo mode I see with this approach would be the loss of the ability state,

cancelling and ungranting abilities could result in the player not being able to photograph the character aiming or executing another ability as it has been cancelled.

Do you have any recommendations for how to approach implementing a photo mode like feature within the lyra framework?

Should we go for changing pawns for a feature like this or are there better approaches?

I would love to hear your thoughts!

Kind Regards

[Attachment Removed]

Steps to Reproduce[Attachment Removed]

Hi there,

I would recommend to create a new Ability System Component for the de-possesed pawn and copying over relevant cosmetic abilities/effects from your core ASC. Reapplying them to the new ASC ensures that anything that needs to be replicated persists properly. Alternatively you could make the cosmetic changes manually without a new ASC.

If the pawn can change cosmetically during the photo mode you should ensure to bind to the relevant events within the player state ASC so that you can also apply those changes to the de-possesed Pawn. You could also just apply these to the pawns ASC if that works for what you want.

You could avoid having to clear all the abilities from the player state by having a gameplay tag that is applied to the player state while in the photo mode. Something simple like “Mode.Photo”. Then you should set that gameplay tag to be a blocking tag for all relevant abilities/effects that you don’t want to be expressed on the photo mode pawn.

- Louis

[Attachment Removed]