From dff49e9c236177fe477655f837dc36b9f8b0b386 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 15 Sep 2020 00:31:32 +0300 Subject: Fix RotateY --- src/math/Matrix.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/math') diff --git a/src/math/Matrix.cpp b/src/math/Matrix.cpp index 80e287d3..3ac3e2b9 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 -- cgit v1.2.3