Correction of a bug in the constraint solver
git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@345 92aac97c-a6ce-11dd-a772-7fcde58d38e6
This commit is contained in:
parent
7b19ce4ef8
commit
df4f379dde
|
@ -256,8 +256,8 @@ void ConstraintSolver::computeVectorVconstraint(double dt) {
|
||||||
for (uint i=0; i<nbConstraints; i++) {
|
for (uint i=0; i<nbConstraints; i++) {
|
||||||
indexBody1 = bodyNumberMapping[bodyMapping[i][0]];
|
indexBody1 = bodyNumberMapping[bodyMapping[i][0]];
|
||||||
indexBody2 = bodyNumberMapping[bodyMapping[i][1]];
|
indexBody2 = bodyNumberMapping[bodyMapping[i][1]];
|
||||||
Vconstraint[indexBody1] = Vconstraint[indexBody1] + (B_sp[indexBody1][i] * lambda.getValue(i)).getVector() * dt;
|
Vconstraint[indexBody1] = Vconstraint[indexBody1] + (B_sp[0][i] * lambda.getValue(i)).getVector() * dt;
|
||||||
Vconstraint[indexBody2] = Vconstraint[indexBody2] +(B_sp[indexBody2][i] * lambda.getValue(i)).getVector() * dt;
|
Vconstraint[indexBody2] = Vconstraint[indexBody2] + (B_sp[1][i] * lambda.getValue(i)).getVector() * dt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user