Code: Select all
if (m_qRotation.v != qRotation.v || m_qRotation.w != qRotation.w)
{
nWhyFlags |= ENTITY_XFORM_ROT;
changed++;
m_qRotation = qRotation;
}
So imagine I'm debugging C++ 3rd person template project, I put the break point at this line. Because this line is called each milliseconds, so when I put breakpoint here, it constantly get hit, thus the mouse in game is not moved at all.
There is the case: m_qRotation.w = 0.999999940 and qRotation.w = 1.00000000, thus the condition m_qRotation.w != qRotation.w becomes true. Should it be crymath::abs(m_qRotation.w - qRotation.w) > EPSILON instead (where EPSILON = 0.00001)?