Change constraint solver threshold-based termination condition on residual of velocity threshold, not on residual of impulse threshold.
This avoids issues with systems with large mass ratios. Test: add this to BasicDemo/BasicExample.cpp in initPhysics m_dynamicsWorld->getSolverInfo().m_numIterations = 1000; m_dynamicsWorld->getSolverInfo().m_leastSquaresResidualThreshold = 1e-4;
This commit is contained in:
@@ -2954,9 +2954,9 @@ btVector3 PhysicsServerExample::getRayTo(int x,int y)
|
||||
|
||||
btVector3 hor;
|
||||
hor = rayForward.cross(vertical);
|
||||
hor.normalize();
|
||||
hor.safeNormalize();
|
||||
vertical = hor.cross(rayForward);
|
||||
vertical.normalize();
|
||||
vertical.safeNormalize();
|
||||
|
||||
float tanfov = tanf(0.5f*fov);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user