Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Fix RotateY
  • Loading branch information
Sergeanur committed Sep 14, 2020
1 parent 38ec1bd commit 9c2e9fcf886533ea2a1fdd415b31c659ca733286
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/math/Matrix.cpp
@@ -327,14 +327,14 @@ CMatrix::RotateY(float y)
float px = m_matrix.pos.x; float px = m_matrix.pos.x;
float pz = m_matrix.pos.z; float pz = m_matrix.pos.z;


m_matrix.right.x = c * rx - s * rz; m_matrix.right.x = c * rx + s * rz;
m_matrix.right.z = c * rz + s * rx; m_matrix.right.z = c * rz - s * rx;
m_matrix.up.x = c * ux - s * uz; m_matrix.up.x = c * ux + s * uz;
m_matrix.up.z = c * uz + s * ux; m_matrix.up.z = c * uz - s * ux;
m_matrix.at.x = c * ax - s * az; m_matrix.at.x = c * ax + s * az;
m_matrix.at.z = c * az + s * ax; m_matrix.at.z = c * az - s * ax;
m_matrix.pos.x = c * px - s * pz; m_matrix.pos.x = c * px + s * pz;
m_matrix.pos.z = c * pz + s * px; m_matrix.pos.z = c * pz - s * px;
} }


void void

0 comments on commit 9c2e9fc

Please sign in to comment.