Fix regression in the WASM version of the velocity solver.

This commit is contained in:
Crozet Sébastien
2021-03-08 15:14:54 +01:00
parent 808ea02672
commit 8dab63bda1
2 changed files with 10 additions and 0 deletions

View File

@@ -185,6 +185,11 @@ impl VelocityConstraint {
#[cfg(target_arch = "wasm32")]
{
constraint.dir1 = force_dir1;
#[cfg(feature = "dim3")]
{
constraint.tangent1 = tangents1[0];
constraint.tangent_rot1 = tangent_rot1;
}
constraint.im1 = rb1.effective_inv_mass;
constraint.im2 = rb2.effective_inv_mass;
constraint.limit = 0.0;

View File

@@ -114,6 +114,11 @@ impl VelocityGroundConstraint {
#[cfg(target_arch = "wasm32")]
{
constraint.dir1 = force_dir1;
#[cfg(feature = "dim3")]
{
constraint.tangent1 = tangents1[0];
constraint.tangent_rot1 = tangent_rot1;
}
constraint.im2 = rb2.effective_inv_mass;
constraint.limit = 0.0;
constraint.mj_lambda2 = mj_lambda2;