From 3872e9615c863f22abd9966f5e5b8b0c87892e3e Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Tue, 25 Dec 2012 17:35:52 +0100 Subject: [PATCH] Use unit friction vectors --- src/constraint/Contact.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/constraint/Contact.h b/src/constraint/Contact.h index 99dcd89d..ab4b1f86 100644 --- a/src/constraint/Contact.h +++ b/src/constraint/Contact.h @@ -182,11 +182,11 @@ inline void Contact::computeFrictionVectors() { mFrictionVectors.clear(); // Compute the first orthogonal vector - Vector3 vector1 = mNormal.getOneOrthogonalVector(); + Vector3 vector1 = mNormal.getOneOrthogonalVector().getUnit(); mFrictionVectors.push_back(vector1); // Compute the second orthogonal vector using the cross product - mFrictionVectors.push_back(mNormal.cross(vector1)); + mFrictionVectors.push_back(mNormal.cross(vector1).getUnit()); } // Return the normal vector of the contact