Fix Inertia tensor update & Generic 6DOF Joint
This commit is contained in:
parent
cc30e2a9a5
commit
d4452e3a65
2 changed files with 4 additions and 3 deletions
|
@ -45,8 +45,9 @@ void BodySW::_update_transform_dependant() {
|
|||
// update inertia tensor
|
||||
Basis tb = principal_inertia_axes;
|
||||
Basis tbt = tb.transposed();
|
||||
tb.scale(_inv_inertia);
|
||||
_inv_inertia_tensor = tb * tbt;
|
||||
Basis diag;
|
||||
diag.scale(_inv_inertia);
|
||||
_inv_inertia_tensor = tb * diag * tbt;
|
||||
}
|
||||
|
||||
void BodySW::update_inertias() {
|
||||
|
|
|
@ -219,7 +219,7 @@ Generic6DOFJointSW::Generic6DOFJointSW(BodySW *rbA, BodySW *rbB, const Transform
|
|||
}
|
||||
|
||||
void Generic6DOFJointSW::calculateAngleInfo() {
|
||||
Basis relative_frame = m_calculatedTransformA.basis.inverse() * m_calculatedTransformB.basis;
|
||||
Basis relative_frame = m_calculatedTransformB.basis.inverse() * m_calculatedTransformA.basis;
|
||||
|
||||
m_calculatedAxisAngleDiff = relative_frame.get_euler();
|
||||
|
||||
|
|
Loading…
Reference in a new issue