hzqst / MetaHookSv

MetaHook (https://github.com/nagist/metahook) porting for SvEngine (GoldSrc engine modified by Sven-Coop)
MIT License
149 stars 37 forks source link

[BulletPhysics] CheckConstraintLinearErrors? #497

Closed hzqst closed 1 month ago

hzqst commented 1 month ago
void btGeneric6DofSpring2Constraint::calculateLinearInfo()
{
    m_calculatedLinearDiff = m_calculatedTransformB.getOrigin() - m_calculatedTransformA.getOrigin();
    m_calculatedLinearDiff = m_calculatedTransformA.getBasis().inverse() * m_calculatedLinearDiff;
    for (int i = 0; i < 3; i++)
    {
        m_linearLimits.m_currentLinearDiff[i] = m_calculatedLinearDiff[i];
        m_linearLimits.testLimitValue(i, m_calculatedLinearDiff[i]);
    }
}
hzqst commented 1 month ago

Done in https://github.com/hzqst/MetaHookSv/releases/tag/v20241011e