일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 언리얼 엔진
- gas
- gameplay ability system
- gameplay effect
- 언리얼엔진
- Aegis
- 게임 개발
- attribute
- Unreal Engine
- 유니티
- Replication
- UI
- Multiplay
- os
- ability task
- 보안
- listen server
- animation
- stride
- unity
- MAC
- network object pooling
- 게임개발
- rpc
- map design
- CTF
- photon fusion2
- nanite
- gameplay tag
- local prediction
Archives
- Today
- Total
Replicated
** [Drag Down] Animation Local Prediction + RPC ** 본문
언리얼 엔진/Drag Down (캡스톤 디자인)
** [Drag Down] Animation Local Prediction + RPC **
라구넹 2025. 4. 30. 17:20void UDDGA_ActionBase::PlayAnim(FName SectionName)
{
FScopedPredictionWindow ScopedPrediction(ASC, !AvatarCharacter->HasAuthority());
// for anim local prediction
MontageTask = UAbilityTask_PlayMontageAndWait::CreatePlayMontageAndWaitProxy(
this,
TEXT("ActionMontage"),
ActionMontage,
1.0f,
SectionName,
true);
MontageTask->ReadyForActivation();
// for other client's fast anim sync
if (AvatarCharacter && ASC)
{
AvatarCharacter->NetMulticastPlayOtherClientMontage(ActionMontage, SectionName);
}
}
자기 자신은 UAbilityTask_PlayMontageAndWait로 로컬 프레딕션,
다른 클라이언트는 RPC로 빠르게 동기화한다
void ADDCharacterBase::NetMulticastPlayOtherClientMontage_Implementation(UAnimMontage* Montage, FName SectionName)
{
if (IsLocallyControlled()) return;
UE_LOG(LogDD, Display, TEXT("[NetMode : %d] NetMulticastPlayAnimMontage_Implementation"), GetWorld()->GetNetMode());
if ( GetMesh() && GetMesh()->GetAnimInstance() )
{
GetMesh()->GetAnimInstance()->Montage_Play(Montage, 1.0f);
if (!SectionName.IsNone())
{
GetMesh()->GetAnimInstance()->Montage_JumpToSection(SectionName, Montage);
}
}
}
RPC는 로컬 컨트롤러는 리턴시킨다
GAS의 철학을 최대한 지키되, 성능은 유지하고자 하였다.
'언리얼 엔진 > Drag Down (캡스톤 디자인)' 카테고리의 다른 글
[Drag Down] Data-Dirven 설계 (2) | 2025.04.30 |
---|---|
[Drag Down] GAS관리 Actor Component로 분리 (0) | 2025.04.30 |
[Drag Down] 그래픽, 디스플레이, 사운드 메뉴 (0) | 2025.04.30 |
** [Drag Down] SetRelativeLocation Problem in Multiplay Runtime 덮어써짐 문제 ** (0) | 2025.04.30 |
[Drag Down] 메뉴 만들기 #1 커스텀 UserSetting, 메뉴 토글 (0) | 2025.04.23 |