The ability is not working on remote properly.

kompanions

New member
Hi,
We have created a sitting ability and starting/stopping the ability manually. The ability is working properly on localplayer but sometimes it doesnt work on remote player properly. Then we have checked this with the predefined ability - HeightChange. This is happening with the predefined ability also.
Steps to replicate:
1. Join a player in room.
2. Join second player in room.
3. Without moving the player using input, activate the ability from script using trystartability.
4. The player will sit in local instance but on remote, the player will be standing. although for remote player, the ability is in active state in inspector. But somehow the ability index parameter in animator controller is set for idle state while it should be index parameter of active ability.

Please suggest any solutions for the same.
 
Does your ability use CharacterLocomotion.SetPositionAndRotation() by any chance? You can override the stopAllAbilities parameter, I had the same issue with my ability and it was due to setting platform, which uses that method by default, and will stop all abilities on the remote as that is not overidden, therefore the animation wasn't a match. You can disable the PunCharacterTransformMonitor as your ability starts to prevent this also, reenable it after. With abilities, in general most of everything is done client side but in some use cases, you actually want the remote to perform the ability also, rather than just appear to be.
 
Top