diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-09-15 00:31:32 +0300 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-09-15 00:31:57 +0300 |
commit | 9c2e9fcf886533ea2a1fdd415b31c659ca733286 (patch) | |
tree | 6fda1fe2d7cd6d5dc808ce15d230254498bcab1d /src | |
parent | 38ec1bd50de234faf476daa15ea41778a860ca0b (diff) |
Fix RotateY
Diffstat (limited to 'src')
-rw-r--r-- | src/math/Matrix.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/math/Matrix.cpp b/src/math/Matrix.cpp index 3e77548d..a8b1b182 100644 --- a/src/math/Matrix.cpp +++ b/src/math/Matrix.cpp @@ -327,14 +327,14 @@ CMatrix::RotateY(float y) float px = m_matrix.pos.x; float pz = m_matrix.pos.z; - m_matrix.right.x = c * rx - s * rz; - m_matrix.right.z = c * rz + s * rx; - m_matrix.up.x = c * ux - s * uz; - m_matrix.up.z = c * uz + s * ux; - m_matrix.at.x = c * ax - s * az; - m_matrix.at.z = c * az + s * ax; - m_matrix.pos.x = c * px - s * pz; - m_matrix.pos.z = c * pz + s * px; + m_matrix.right.x = c * rx + s * rz; + m_matrix.right.z = c * rz - s * rx; + m_matrix.up.x = c * ux + s * uz; + m_matrix.up.z = c * uz - s * ux; + m_matrix.at.x = c * ax + s * az; + m_matrix.at.z = c * az - s * ax; + m_matrix.pos.x = c * px + s * pz; + m_matrix.pos.z = c * pz - s * px; } void |