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:
parent
daf79d0d89
commit
ce84a5dc58
@ -1233,14 +1233,16 @@ void UPS_AI_ConvAgent_ElevenLabsComponent::OnRep_ConversationState()
|
|||||||
// replicated to their owning client (bOnlyRelevantToOwner=true).
|
// replicated to their owning client (bOnlyRelevantToOwner=true).
|
||||||
if (bNetIsConversing && NetConversatingPawn)
|
if (bNetIsConversing && NetConversatingPawn)
|
||||||
{
|
{
|
||||||
|
Posture->bActive = true;
|
||||||
Posture->TargetActor = NetConversatingPawn;
|
Posture->TargetActor = NetConversatingPawn;
|
||||||
Posture->ResetBodyTarget();
|
Posture->ResetBodyTarget();
|
||||||
Posture->bEnableBodyTracking = true;
|
Posture->bEnableBodyTracking = true;
|
||||||
UE_LOG(LogPS_AI_ConvAgent_ElevenLabs, Log,
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Posture->bActive = false;
|
||||||
Posture->TargetActor = nullptr;
|
Posture->TargetActor = nullptr;
|
||||||
Posture->bEnableBodyTracking = false;
|
Posture->bEnableBodyTracking = false;
|
||||||
UE_LOG(LogPS_AI_ConvAgent_ElevenLabs, Warning,
|
UE_LOG(LogPS_AI_ConvAgent_ElevenLabs, Warning,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user