Fix head tracking on remote clients: activate PostureComponent in OnRep

PostureComponent starts with bActive=false and waits for
OnConversationConnected, which only fires on the server (WebSocket).
Remote clients never got bActive=true, so CurrentActiveAlpha stayed
at 0 and all head/eye rotation was zeroed out.

Now OnRep_ConversationState also sets Posture->bActive alongside
TargetActor, matching what was already done for FacialExpression
and LipSync components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
j.foucher 2026-03-02 15:33:07 +01:00
parent daf79d0d89
commit ce84a5dc58

View File

@ -1233,14 +1233,16 @@ void UPS_AI_ConvAgent_ElevenLabsComponent::OnRep_ConversationState()
// replicated to their owning client (bOnlyRelevantToOwner=true).
if (bNetIsConversing && NetConversatingPawn)
{
Posture->bActive = true;
Posture->TargetActor = NetConversatingPawn;
Posture->ResetBodyTarget();
Posture->bEnableBodyTracking = true;
UE_LOG(LogPS_AI_ConvAgent_ElevenLabs, Log,
TEXT("[NET-REP] Posture TargetActor set to %s"), *NetConversatingPawn->GetName());
TEXT("[NET-REP] Posture ACTIVATED, TargetActor set to %s"), *NetConversatingPawn->GetName());
}
else
{
Posture->bActive = false;
Posture->TargetActor = nullptr;
Posture->bEnableBodyTracking = false;
UE_LOG(LogPS_AI_ConvAgent_ElevenLabs, Warning,