fixed gimba lock for unity

This commit is contained in:
2025-04-26 00:52:46 +03:00
parent 2734b58bdd
commit 69b9049fb0
2 changed files with 4 additions and 4 deletions

View File

@@ -294,7 +294,7 @@ namespace omath
[[nodiscard]]
constexpr std::array<Type, Rows * Columns>& RawArray()
{
return const_cast<std::array<Type, Rows * Columns>>(std::as_const(*this).RawArray());
return m_data;
}
[[nodiscard]]

View File

@@ -32,9 +32,9 @@ namespace omath::unity_engine
}
Mat4x4 RotationMatrix(const ViewAngles& angles)
{
return MatRotationAxisZ(angles.roll) *
MatRotationAxisY(angles.yaw) *
MatRotationAxisX(angles.pitch);
return MatRotationAxisX<float, MatStoreType::ROW_MAJOR>(angles.pitch) *
MatRotationAxisY<float, MatStoreType::ROW_MAJOR>(angles.yaw) *
MatRotationAxisZ<float, MatStoreType::ROW_MAJOR>(angles.roll);
}
Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near,
const float far)