mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-18 20:00:56 +00:00
Bullet 2.82 update
This commit is contained in:
parent
d0a64026b0
commit
416c50690e
146 changed files with 12202 additions and 1422 deletions
|
|
@ -1767,7 +1767,23 @@ void btSoftBody::predictMotion(btScalar dt)
|
|||
{
|
||||
Node& n=m_nodes[i];
|
||||
n.m_q = n.m_x;
|
||||
n.m_v += n.m_f*n.m_im*m_sst.sdt;
|
||||
btVector3 deltaV = n.m_f*n.m_im*m_sst.sdt;
|
||||
{
|
||||
btScalar maxDisplacement = m_worldInfo->m_maxDisplacement;
|
||||
btScalar clampDeltaV = maxDisplacement/m_sst.sdt;
|
||||
for (int c=0;c<3;c++)
|
||||
{
|
||||
if (deltaV[c]>clampDeltaV)
|
||||
{
|
||||
deltaV[c] = clampDeltaV;
|
||||
}
|
||||
if (deltaV[c]<-clampDeltaV)
|
||||
{
|
||||
deltaV[c]=-clampDeltaV;
|
||||
}
|
||||
}
|
||||
}
|
||||
n.m_v += deltaV;
|
||||
n.m_x += n.m_v*m_sst.sdt;
|
||||
n.m_f = btVector3(0,0,0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue