aboutsummaryrefslogtreecommitdiff
path: root/src/dynamics/solver/joint_constraint/fixed_velocity_constraint.rs
diff options
context:
space:
mode:
authorCrozet Sébastien <developer@crozet.re>2021-05-25 11:00:13 +0200
committerCrozet Sébastien <developer@crozet.re>2021-05-25 11:00:13 +0200
commit1bef66fea941307a7305ddaebdb0abe3d0cb281f (patch)
tree450bc3cd2fd611f91cb7d7809edcc4260f043b0b /src/dynamics/solver/joint_constraint/fixed_velocity_constraint.rs
parent47139323e01f978a94ed7aa2c33bbf63b00f4c30 (diff)
downloadrapier-1bef66fea941307a7305ddaebdb0abe3d0cb281f.tar.gz
rapier-1bef66fea941307a7305ddaebdb0abe3d0cb281f.tar.bz2
rapier-1bef66fea941307a7305ddaebdb0abe3d0cb281f.zip
Add prelude + use vectors for setting linvel/translation in builders
Diffstat (limited to 'src/dynamics/solver/joint_constraint/fixed_velocity_constraint.rs')
-rw-r--r--src/dynamics/solver/joint_constraint/fixed_velocity_constraint.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dynamics/solver/joint_constraint/fixed_velocity_constraint.rs b/src/dynamics/solver/joint_constraint/fixed_velocity_constraint.rs
index a0c0739..8bfc1a6 100644
--- a/src/dynamics/solver/joint_constraint/fixed_velocity_constraint.rs
+++ b/src/dynamics/solver/joint_constraint/fixed_velocity_constraint.rs
@@ -63,8 +63,8 @@ impl FixedVelocityConstraint {
let (poss1, vels1, mprops1, ids1) = rb1;
let (poss2, vels2, mprops2, ids2) = rb2;
- let anchor1 = poss1.position * cparams.local_anchor1;
- let anchor2 = poss2.position * cparams.local_anchor2;
+ let anchor1 = poss1.position * cparams.local_frame1;
+ let anchor2 = poss2.position * cparams.local_frame2;
let im1 = mprops1.effective_inv_mass;
let im2 = mprops2.effective_inv_mass;
let ii1 = mprops1.effective_world_inv_inertia_sqrt.squared();
@@ -280,13 +280,13 @@ impl FixedVelocityGroundConstraint {
let (anchor1, anchor2) = if flipped {
(
- poss1.position * cparams.local_anchor2,
- poss2.position * cparams.local_anchor1,
+ poss1.position * cparams.local_frame2,
+ poss2.position * cparams.local_frame1,
)
} else {
(
- poss1.position * cparams.local_anchor1,
- poss2.position * cparams.local_anchor2,
+ poss1.position * cparams.local_frame1,
+ poss2.position * cparams.local_frame2,
)
};