Merge branch 'main' of https://github.com/aws-lumberyard/o3de into ly-as-sdk/LYN-2948-phistere

This commit is contained in:
lumberyard-employee-dm
2021-05-25 23:48:55 -05:00
1623 changed files with 54998 additions and 47910 deletions
@@ -58,19 +58,9 @@ namespace Camera
float axisPolarity = m_shouldInvertAxis ? -1.0f : 1.0f;
float rotationAmount = axisPolarity * m_rotationAmount;
// remove translation and scale
AZ::Vector3 translation = outLookAtTargetTransform.GetTranslation();
outLookAtTargetTransform.SetTranslation(AZ::Vector3::CreateZero());
AZ::Vector3 transformScale = outLookAtTargetTransform.ExtractScale();
// perform our rotation
AZ::Transform desiredRotationTransform = AZ::Transform::CreateFromQuaternion(AZ::Quaternion::CreateFromAxisAngle(outLookAtTargetTransform.GetBasis(m_axisOfRotation), rotationAmount));
outLookAtTargetTransform = desiredRotationTransform * outLookAtTargetTransform;
// return scale and translate
outLookAtTargetTransform.SetScale(transformScale);
outLookAtTargetTransform.SetTranslation(translation);
AZ::Quaternion desiredRotation = AZ::Quaternion::CreateFromAxisAngle(
outLookAtTargetTransform.GetBasis(m_axisOfRotation), rotationAmount);
outLookAtTargetTransform.SetRotation(desiredRotation * outLookAtTargetTransform.GetRotation());
}
void RotateCameraLookAt::Activate(AZ::EntityId entityId)