Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,11 @@ private static double nativeSliderTranslation(final com.jme3.bullet.joints.Slide
com.jme3.math.Quaternion rotA = a.getPhysicsRotation(new com.jme3.math.Quaternion());
com.jme3.math.Quaternion rotB = b.getPhysicsRotation(new com.jme3.math.Quaternion());
com.jme3.math.Vector3f pointA = a.getPhysicsLocation(new com.jme3.math.Vector3f())
.add(rotA.mult(frameA.getTranslation()));
.add(rotA.toRotationMatrix().mult(frameA.getTranslation(), new com.jme3.math.Vector3f()));
com.jme3.math.Vector3f pointB = b.getPhysicsLocation(new com.jme3.math.Vector3f())
.add(rotB.mult(frameB.getTranslation()));
com.jme3.math.Vector3f axis = rotA.mult(frameA.getRotation()).mult(com.jme3.math.Vector3f.UNIT_X);
.add(rotB.toRotationMatrix().mult(frameB.getTranslation(), new com.jme3.math.Vector3f()));
com.jme3.math.Vector3f axis = rotA.mult(frameA.getRotation()).toRotationMatrix()
.mult(com.jme3.math.Vector3f.UNIT_X, new com.jme3.math.Vector3f());
return pointB.subtract(pointA).dot(axis);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,6 @@ private Matrix3f jointFrame(final PhysicsRigidBody body, final Vector3f worldAxi
Matrix3f worldBasis = new Matrix3f();
worldBasis.fromAxes(worldAxis, second, third);
Matrix3f inverseRotation = body.getPhysicsRotation(new Quaternion()).inverse().toRotationMatrix();
return inverseRotation.mult(worldBasis);
return inverseRotation.mult(worldBasis, new Matrix3f());
}
}
Loading