10 m_CmdStartSwimming = pAnimationComponent.BindCommand(
"CMD_Swim");
11 m_VarSpeed = pAnimationComponent.BindVariableFloat(
"MovementSpeed");
12 m_VarDirection = pAnimationComponent.BindVariableFloat(
"MovementDirection");
13 m_TagIsSwimming = pAnimationComponent.BindTag(
"TagSwimming");
16 TAnimGraphCommand m_CmdStartSwimming;
17 TAnimGraphVariable m_VarSpeed;
18 TAnimGraphVariable m_VarDirection;
19 TAnimGraphTag m_TagIsSwimming;
33 m_Input = pController.GetInputContext();
40 PreAnim_CallCommand(
m_Table.m_CmdStartSwimming, 1, 1);
46 PreAnim_CallCommand(
m_Table.m_CmdStartSwimming, -1, 0);
70 Print(
"SCR_CharacterCommandSwim::OnDeactivate");
91 m_Input.GetMovement(speed, localDir);
92 heading =
m_Input.GetHeadingAngle();
99 if (localDir[2] > 0.3)
113 PreAnim_SetFloat(
m_Table.m_VarSpeed, animSpeed);
141 Print(
"SCR_CharacterCommandSwim::PrePhysUpdate: " + pDt.ToString());
155 vector trans = vector.Zero;
158 PrePhys_GetTranslation(trans);
161 delta += Math.Sin(
m_fTime * 3) * 0.003;
164 trans[1] = trans[1] + delta;
169 float swimSpeedX = 0, swimSpeedZ = 0;
172 m_Input.GetMovement(speed, locDir);
193 PrePhys_SetTranslation(trans);
200 Print(
"SCR_CharacterCommandSwim::PostPhysUpdate: " + pDt.ToString());