Hi,
Not sure this is a problem with ue4 or a misunderstanding on my side.
The following thread:
led me to narrow down my problem to the following.
I want my custom playercontroller to possess a target pawn from a client.
This is the RPC in my playercontroller.cpp:
void AyagPlayerController::ControlPawn_Implementation(APawn* TracedCharacter)
{
if (Role == ROLE_Authority)
{
Possess(TracedCharacter);
}
}
And this is the control definition in the target pawn (both for X and Y axis, on moving mouse):
FRotator Rotation = PlayerController->GetControlRotation();
FVector Direction = FRotationMatrix(Rotation).GetScaledAxis(EAxis::Y);
AddMovementInput(Direction, Value);
This looks like a simple enough configuration, but i get different results on the server and on the client (every actor -including the playercontroller- have their bReplicates and bReplicateMovements set to true).
On the server, the possessed pawn uses its own local referential to move (as intended).
On the client, the possessed pawn uses the initial (starting) pawn referential (the one controlled before the new possession happens).
So it seems that during the possession, the PlayerController location and rotation are not replicated.
Am i doing something wrong ?
Thanks for your help.
Cedric