Address PR feedback
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
This commit is contained in:
@@ -2513,7 +2513,7 @@ void EditorViewportWidget::SetViewAndMovementLockFromEntityPerspective(const AZ:
|
||||
|
||||
if (entityId.IsValid())
|
||||
{
|
||||
EBUS_EVENT_ID(entityId, Camera::CameraRequestBus, MakeActiveView);
|
||||
Camera::CameraRequestBus::Event(entityId, &Camera::CameraRequestBus::Events::MakeActiveView);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -25,7 +25,10 @@
|
||||
Ang3 CUndoViewRotation::GetActiveCameraRotation()
|
||||
{
|
||||
AZ::Transform activeCameraTm = AZ::Transform::CreateIdentity();
|
||||
EBUS_EVENT_RESULT(activeCameraTm, Camera::ActiveCameraRequestBus, GetActiveCameraTransform);
|
||||
Camera::ActiveCameraRequestBus::BroadcastResult(
|
||||
activeCameraTm,
|
||||
&Camera::ActiveCameraRequestBus::Events::GetActiveCameraTransform
|
||||
);
|
||||
const AZ::Matrix3x4 cameraMatrix = AZ::Matrix3x4::CreateFromTransform(activeCameraTm);
|
||||
const Matrix33 cameraMatrixCry = AZMatrix3x3ToLYMatrix3x3(AZ::Matrix3x3::CreateFromMatrix3x4(cameraMatrix));
|
||||
return RAD2DEG(Ang3::GetAnglesXYZ(cameraMatrixCry));
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace AZ
|
||||
|
||||
float GetPerspectiveMatrixFOV(const Matrix4x4& m)
|
||||
{
|
||||
return 2.0 * atan(1.0f / m.GetElement(1, 1));
|
||||
return 2.0 * AZStd::atan(1.0f / m.GetElement(1, 1));
|
||||
}
|
||||
|
||||
Matrix4x4* MakeFrustumMatrixRH(Matrix4x4& out, float left, float right, float bottom, float top, float nearDist, float farDist, bool reverseDepth)
|
||||
|
||||
Reference in New Issue
Block a user