本文整理汇总了C++中IActor::SetIKPos方法的典型用法代码示例。如果您正苦于以下问题:C++ IActor::SetIKPos方法的具体用法?C++ IActor::SetIKPos怎么用?C++ IActor::SetIKPos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IActor
的用法示例。
在下文中一共展示了IActor::SetIKPos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Update
//------------------------------------------------------------------------
void CVehicleSeatActionPassengerIK::Update(float frameTime)
{
if (!m_passengerId)
return;
IActor* pActor = CCryAction::GetCryAction()->GetIActorSystem()->GetActor(m_passengerId);
if (!pActor)
{
CRY_ASSERT(!"Invalid entity id for the actor id, Actor System didn't know it");
return;
}
if (ICharacterInstance* pCharInstance = pActor->GetEntity()->GetCharacter(0))
{
ISkeletonAnim* pSkeletonAnim = pCharInstance->GetISkeletonAnim();
CRY_ASSERT(pSkeletonAnim);
if (pSkeletonAnim->GetNumAnimsInFIFO(0) >= 1)
{
const CAnimation& anim = pSkeletonAnim->GetAnimFromFIFO(0, 0);
const uint16 loopCount = anim.GetLoop();
const f32 animationTime = pSkeletonAnim->GetAnimationNormalizedTime( &anim );
if (!m_waitShortlyBeforeStarting || (loopCount > 0 || animationTime > 0.9f))
{
for (TIKLimbVector::iterator ite = m_ikLimbs.begin(); ite != m_ikLimbs.end(); ++ite)
{
const SIKLimb& limb = *ite;
Vec3 helperPos = limb.pHelper->GetWorldSpaceTranslation();
pActor->SetIKPos(limb.limbName.c_str(), helperPos, 1);
}
}
}
}
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:37,代码来源:VehicleSeatActionPassengerIK.cpp