diff --git a/include/omath/mat.hpp b/include/omath/mat.hpp index 1d7b451..47773c6 100644 --- a/include/omath/mat.hpp +++ b/include/omath/mat.hpp @@ -294,7 +294,7 @@ namespace omath [[nodiscard]] constexpr std::array& RawArray() { - return const_cast>(std::as_const(*this).RawArray()); + return m_data; } [[nodiscard]] diff --git a/source/engines/unity_engine/formulas.cpp b/source/engines/unity_engine/formulas.cpp index 798920d..4477253 100644 --- a/source/engines/unity_engine/formulas.cpp +++ b/source/engines/unity_engine/formulas.cpp @@ -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(angles.pitch) * + MatRotationAxisY(angles.yaw) * + MatRotationAxisZ(angles.roll); } Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near, const float far)