adjust rotational speed by delta time

This commit is contained in:
itsmattkc 2025-05-30 19:31:29 -07:00
parent 613e5b8d9f
commit 42f0c8ad5e

View File

@ -352,7 +352,7 @@ MxBool LegoNavController::CalculateNewPosDir(
m_rotationalVel = CalculateNewVel(m_targetRotationalVel, m_rotationalVel, m_rotationalAccel * 40.0f, deltaTime); m_rotationalVel = CalculateNewVel(m_targetRotationalVel, m_rotationalVel, m_rotationalAccel * 40.0f, deltaTime);
} }
else { else {
m_rotationalVel = m_targetRotationalVel; m_rotationalVel = m_targetRotationalVel * m_maxRotationalVel * deltaTime;
} }
m_linearVel = CalculateNewVel(m_targetLinearVel, m_linearVel, m_linearAccel, deltaTime); m_linearVel = CalculateNewVel(m_targetLinearVel, m_linearVel, m_linearAccel, deltaTime);