本文整理汇总了C++中IAnimatedCharacter::SetMovementControlMethods方法的典型用法代码示例。如果您正苦于以下问题:C++ IAnimatedCharacter::SetMovementControlMethods方法的具体用法?C++ IAnimatedCharacter::SetMovementControlMethods怎么用?C++ IAnimatedCharacter::SetMovementControlMethods使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAnimatedCharacter
的用法示例。
在下文中一共展示了IAnimatedCharacter::SetMovementControlMethods方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Exit
void CActionCoopAnimation::Exit()
{
SendStateEventCoopAnim();
TPlayerAction::Exit();
IAnimatedCharacter* pAnimChar = m_player.GetAnimatedCharacter();
IAnimatedCharacter* pAnimCharTarget = m_targetEntityID ? m_target.GetAnimatedCharacter() : NULL;
if( pAnimChar )
{
pAnimChar->SetMovementControlMethods(eMCM_Entity, eMCM_Entity);
pAnimChar->ForceRefreshPhysicalColliderMode();
pAnimChar->RequestPhysicalColliderMode(eColliderMode_Undefined, eColliderModeLayer_Game, "CActionStealthKill::Exit()");
}
if (pAnimCharTarget)
{
pAnimCharTarget->SetMovementControlMethods(eMCM_Entity, eMCM_Entity);
pAnimCharTarget->ForceRefreshPhysicalColliderMode();
pAnimCharTarget->RequestPhysicalColliderMode(eColliderMode_Undefined, eColliderModeLayer_Game, "CActionStealthKill::Exit()");
}
RemoveTargetFromSlaveContext();
m_player.PartialAnimationControlled( false, PlayerCameraAnimationSettings());
m_player.GetActorStats()->animationControlledID = 0;
m_player.HolsterItem(false);
// Update visibility to change render mode of 1st person character
m_player.RefreshVisibilityState();
}
示例2: SetMovementParameters
void CAnimActionAIStance::SetMovementParameters()
{
IAnimatedCharacter* pAnimatedCharacter = m_pPlayer->GetAnimatedCharacter();
if ( pAnimatedCharacter )
{
CAIAnimationComponent* pAnimationComponent = m_pPlayer->GetAIAnimationComponent();
CRY_ASSERT( pAnimationComponent );
if (pAnimationComponent->GetUseLegacyCoverLocator())
{
const bool toCoverStance = ( m_targetStance == STANCE_HIGH_COVER || m_targetStance == STANCE_LOW_COVER );
if ( toCoverStance )
{
pAnimatedCharacter->SetMovementControlMethods( eMCM_Entity, eMCM_Entity );
pAnimatedCharacter->UseAnimationMovementForEntity( true, true, false );
}
else
{
pAnimatedCharacter->SetMovementControlMethods( eMCM_AnimationHCollision, eMCM_Entity );
}
}
else
{
pAnimatedCharacter->SetMovementControlMethods( eMCM_AnimationHCollision, eMCM_Entity );
}
}
}
示例3: Exit
virtual void Exit()
{
TPlayerAction::Exit();
IAnimatedCharacter* pAnimChar = m_player.GetAnimatedCharacter();
if( pAnimChar )
{
pAnimChar->SetMovementControlMethods(eMCM_Entity, eMCM_Entity);
pAnimChar->ForceRefreshPhysicalColliderMode();
pAnimChar->RequestPhysicalColliderMode(eColliderMode_Undefined, eColliderModeLayer_Game, "CActionLedgeGrab::Enter()");
}
if (!m_haveUnHolsteredWeapon)
{
m_haveUnHolsteredWeapon=true;
m_player.HolsterItem_NoNetwork(false, true, 0.5f);
}
m_player.PartialAnimationControlled( false, PlayerCameraAnimationSettings() );
SPlayerStats *pPlayerStats = m_player.GetActorStats();
pPlayerStats->forceSTAP = SPlayerStats::eFS_None;
pPlayerStats->bDisableTranslationPinning=false;
m_player.StateMachineHandleEventMovement( PLAYER_EVENT_LEDGE_ANIM_FINISHED );
}
示例4: Enter
virtual void Enter()
{
TPlayerAction::Enter();
IAnimatedCharacter* pAnimChar = m_player.GetAnimatedCharacter();
if( pAnimChar )
{
pAnimChar->SetMovementControlMethods(eMCM_Animation, eMCM_Animation);
pAnimChar->RequestPhysicalColliderMode(eColliderMode_Disabled, eColliderModeLayer_Game, "CActionLedgeGrab::Enter()");
}
switch (m_transitionType)
{
case SLedgeTransitionData::eOLT_VaultOverIntoFall:
case SLedgeTransitionData::eOLT_VaultOnto:
case SLedgeTransitionData::eOLT_VaultOver:
case SLedgeTransitionData::eOLT_HighVaultOverIntoFall:
case SLedgeTransitionData::eOLT_HighVaultOnto:
case SLedgeTransitionData::eOLT_HighVaultOver:
break;
default:
{
PlayerCameraAnimationSettings cameraAnimationSettings;
cameraAnimationSettings.positionFactor = 1.0f;
cameraAnimationSettings.rotationFactor = g_pGameCVars->pl_ledgeClamber.cameraBlendWeight;
m_player.PartialAnimationControlled( true, cameraAnimationSettings );
}
break;
}
}
示例5: Enter
void CActionCoopAnimation::Enter()
{
TPlayerAction::Enter();
QuatT targetPos(m_rootScope->GetEntity().GetPos(), m_rootScope->GetEntity().GetRotation());
SetParam("TargetPos", targetPos);
CRecordingSystem* pRecordingSystem = g_pGame->GetRecordingSystem();
if (pRecordingSystem)
{
pRecordingSystem->OnMannequinSetParam(m_rootScope->GetEntityId(), "TargetPos", targetPos);
}
IAnimatedCharacter* pAnimChar = m_player.GetAnimatedCharacter();
IAnimatedCharacter* pAnimCharTarget = m_target.GetAnimatedCharacter();
if( pAnimChar )
{
pAnimChar->SetMovementControlMethods(eMCM_Animation, eMCM_Animation);
pAnimChar->RequestPhysicalColliderMode(eColliderMode_Disabled, eColliderModeLayer_Game, "CActionStealthKill::Enter()");
}
if (pAnimCharTarget)
{
pAnimCharTarget->SetMovementControlMethods(eMCM_Animation, eMCM_Animation);
pAnimCharTarget->RequestPhysicalColliderMode(eColliderMode_Disabled, eColliderModeLayer_Game, "CActionStealthKill::Enter()");
}
PlayerCameraAnimationSettings cameraAnimationSettings;
cameraAnimationSettings.positionFactor = 1.0f;
cameraAnimationSettings.rotationFactor = 1.0f;
cameraAnimationSettings.stableBlendOff = true;
m_player.PartialAnimationControlled( true, cameraAnimationSettings );
m_player.GetActorStats()->animationControlledID = m_target.GetEntityId();
m_player.HolsterItem(true);
// Update visibility to change render mode of 1st person character
m_player.RefreshVisibilityState();
// Mannequin can't set the tag's correctly on the exit, so we have to do it immediately after we started instead :)
// the tags are set, but Exit() is called too late for our purposes, it is needed during the resolve of the next action
m_rootScope->GetActionController().GetContext().state.Set(m_targetTagID, false);
}
示例6: SetMovementControlledByAnimation
int CScriptBind_Actor::SetMovementControlledByAnimation(IFunctionHandler *pH, bool enable)
{
CActor *pActor = GetActor(pH);
if (!pActor)
return pH->EndFunction();
IAnimatedCharacter* pAnimChar = pActor->GetAnimatedCharacter();
if (!pAnimChar)
return pH->EndFunction();
if(enable)
{
pAnimChar->SetMovementControlMethods(eMCM_AnimationHCollision, eMCM_Animation);
pAnimChar->UseAnimationMovementForEntity( true, true, true );
}
else
{
pAnimChar->SetMovementControlMethods( eMCM_Entity, eMCM_Entity );
pAnimChar->UseAnimationMovementForEntity( false, false, false );
}
return pH->EndFunction();
}
示例7: RestoreMovementParameters
void CAnimActionAIStance::RestoreMovementParameters()
{
// We are currently not storing the parameters from SetMovementParameters, but going back to hopefully reasonable defaults instead.
IAnimatedCharacter* pAnimatedCharacter = m_pPlayer->GetAnimatedCharacter();
if ( pAnimatedCharacter )
{
pAnimatedCharacter->SetMovementControlMethods( eMCM_Entity, eMCM_Entity );
CAIAnimationComponent* pAnimationComponent = m_pPlayer->GetAIAnimationComponent();
CRY_ASSERT( pAnimationComponent );
if (pAnimationComponent->GetUseLegacyCoverLocator())
{
pAnimatedCharacter->UseAnimationMovementForEntity( false, false, false );
}
}
}
示例8: Enter
virtual void Enter()
{
LadderLog ("Entering %s instance for %s", GetName(), m_player.GetEntity()->GetEntityTextDescription());
LadderLogIndent();
TPlayerAction::Enter();
IAnimatedCharacter* pAnimChar = m_player.GetAnimatedCharacter();
if (pAnimChar)
{
EMovementControlMethod method = m_interruptable ? eMCM_Entity : eMCM_Animation;
pAnimChar->SetMovementControlMethods(method, method);
}
m_player.BlendPartialCameraAnim(m_cameraAnimFactorAtStart, 0.1f);
m_player.SetCanTurnBody(false);
m_ladderState->InformLadderAnimEnter(m_player, this);
}