Hi,
I’m making a custom CharacterMovementComponent and so I created a FCustomSavedMove_Character (inheriting from FSavedMove_Character) and also a FCustomNetworkMoveData (inheriting from FNetworkMoveData).
I have a custom parameter that I want to replicate to server so I have to override the ClientFillNetworkMoveData
void FCustomNetworkMoveData::ClientFillNetworkMoveData(const FSavedMove_Character& ClientMove, ENetworkMoveType MoveType)
{
FCharacterNetworkMoveData::ClientFillNetworkMoveData(ClientMove, MoveType);
//-- Here is my problem !
}
So the problem is that I have to get my custom parameter from the savedmove and I have to cast the FSavedMove_Character& ClientMove → FCustomSavedMove_Character to be able to access to my parameter.
But, whatever I tested (Cast, const_cast, dynamic_cast, static_cast) nothing works. Does someone have a clue on how to Cast my FSavedMove_Character into FCustomSavedMove_Character here ?
Thank you,