diff options
author | m4nu3lf <m4nu3lf@gmail.com> | 2016-12-31 14:39:25 +0000 |
---|---|---|
committer | m4nu3lf <m4nu3lf@gmail.com> | 2017-01-09 00:13:54 +0000 |
commit | 2e38b32e0f261445c2d0b095c1822fbe6df16e25 (patch) | |
tree | 7add49833c34260d581424469818573abd44104a /servers/physics/joints/cone_twist_joint_sw.cpp | |
parent | f2e99826c0b1e8227644bfab0795d858c504d279 (diff) |
Fixed inertia tensor computation and center of mass
Diffstat (limited to 'servers/physics/joints/cone_twist_joint_sw.cpp')
-rw-r--r-- | servers/physics/joints/cone_twist_joint_sw.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/physics/joints/cone_twist_joint_sw.cpp b/servers/physics/joints/cone_twist_joint_sw.cpp index c94cc8bd8c..5036a1d8a3 100644 --- a/servers/physics/joints/cone_twist_joint_sw.cpp +++ b/servers/physics/joints/cone_twist_joint_sw.cpp @@ -128,10 +128,10 @@ bool ConeTwistJointSW::setup(float p_step) { for (int i=0;i<3;i++) { memnew_placement(&m_jac[i], JacobianEntrySW( - A->get_transform().basis.transposed(), - B->get_transform().basis.transposed(), - pivotAInW - A->get_transform().origin, - pivotBInW - B->get_transform().origin, + A->get_principal_inertia_axes().transposed(), + B->get_principal_inertia_axes().transposed(), + pivotAInW - A->get_transform().origin - A->get_center_of_mass(), + pivotBInW - B->get_transform().origin - B->get_center_of_mass(), normal[i], A->get_inv_inertia(), A->get_inv_mass(), |