本文整理汇总了C++中ACharacter::IsPlayingRootMotion方法的典型用法代码示例。如果您正苦于以下问题:C++ ACharacter::IsPlayingRootMotion方法的具体用法?C++ ACharacter::IsPlayingRootMotion怎么用?C++ ACharacter::IsPlayingRootMotion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACharacter
的用法示例。
在下文中一共展示了ACharacter::IsPlayingRootMotion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShouldTickPose
bool USkeletalMeshComponent::ShouldTickPose() const
{
// Characters playing Root Motion will tick pose themselves before physics.
ACharacter * CharacterOwner = Cast<ACharacter>(GetOwner());
const bool bSkipBecauseOfRootMotion = CharacterOwner && CharacterOwner->IsPlayingRootMotion();
// When we stop root motion we go back to ticking after CharacterMovement. Unfortunately that means that we could tick twice that frame.
// So only enforce a single tick per frame.
const bool bAlreadyTickedThisFrame = (LastTickTime == GetWorld()->TimeSeconds);
// Remote Clients on the Server will always tick animations as updates from the client comes in. To use Client's delta time.
const bool bRemoteClientOnServer = CharacterOwner && (CharacterOwner->Role == ROLE_Authority) && CharacterOwner->Controller && !CharacterOwner->Controller->IsLocalController();
return (Super::ShouldTickPose() && IsRegistered() && AnimScriptInstance && !bPauseAnims && GetWorld()->HasBegunPlay() && !bNoSkeletonUpdate && !bSkipBecauseOfRootMotion && !bRemoteClientOnServer && !bAlreadyTickedThisFrame);
}