60 default:
return _L(
"invalid");
81 const Ogre::Real sum_of_vel = fabs(diff_data.
speed[0]) + fabs(diff_data.
speed[1]);
84 const Ogre::Real min_of_vel = std::min(fabs(diff_data.
speed[0]), fabs(diff_data.
speed[1]));
87 const Ogre::Real power_ratio = min_of_vel > 1.0f ? fabs(diff_data.
speed[0]) / sum_of_vel : 0.5f;
94 diff_data.
out_torque[0] *= Ogre::Math::Clamp(0.0f + power_ratio, 0.1f, 0.9f);
95 diff_data.
out_torque[1] *= Ogre::Math::Clamp(1.0f - power_ratio, 0.1f, 0.9f);
106 const Ogre::Real m_torsion_damp = 10000.0f;
107 const Ogre::Real delta_speed = diff_data.
speed[0] - diff_data.
speed[1];
112 diff_data.
out_torque[0] -= delta_speed * m_torsion_damp;
115 diff_data.
out_torque[1] += delta_speed * m_torsion_damp;
129 const Ogre::Real m_torsion_rate = 1000000.0f;
130 const Ogre::Real m_torsion_damp = m_torsion_rate / 100.0f;
131 const Ogre::Real delta_speed = diff_data.
speed[0] - diff_data.
speed[1];
141 diff_data.
out_torque[0] -= delta_speed * m_torsion_damp;
146 diff_data.
out_torque[1] += delta_speed * m_torsion_damp;