Converts physx console commands from cry console to az console, fixes some bugs in the multiplayer gem

This commit is contained in:
karlberg
2021-06-02 14:44:02 -07:00
parent e737307168
commit a69db3bf76
4 changed files with 75 additions and 68 deletions
@@ -81,6 +81,9 @@ namespace Multiplayer
void NetworkTransformComponent::OnResetCountChangedEvent()
{
m_targetTransform.SetRotation(GetRotation());
m_targetTransform.SetTranslation(GetTranslation());
m_targetTransform.SetUniformScale(GetScale());
m_previousTransform = m_targetTransform;
}
@@ -93,6 +96,15 @@ namespace Multiplayer
blendTransform.SetTranslation(m_previousTransform.GetTranslation().Lerp(m_targetTransform.GetTranslation(), blendFactor));
blendTransform.SetScale(m_previousTransform.GetScale().Lerp(m_targetTransform.GetScale(), blendFactor));
GetTransformComponent()->SetWorldTM(blendTransform);
//AZLOG
//(
// NET_Movement,
// "Blending entity to position %f x %f x %f",
// blendTransform.GetTranslation().GetX(),
// blendTransform.GetTranslation().GetY(),
// blendTransform.GetTranslation().GetZ()
//);
}
}