diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-10-31 23:03:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-31 23:03:01 +0100 |
commit | cb3f594b148e33bebf99955c0bb7dce02c8a50c7 (patch) | |
tree | f47a6dc447a83c323c7946ad178420ac66588c36 /servers/physics/body_sw.cpp | |
parent | 24b3733f3bc416f62d353d279733cfaab606f918 (diff) | |
parent | 3df217b1a166e2a6ed836a5bc12d05239fdce3c8 (diff) |
Merge pull request #11249 from m4nu3lf/bugfix/get_euler
Fix inertia tensor update & Generic6DOFJoint & Simplify Basis::get_euler()
Diffstat (limited to 'servers/physics/body_sw.cpp')
-rw-r--r-- | servers/physics/body_sw.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp index 46a5192e52..6ced004118 100644 --- a/servers/physics/body_sw.cpp +++ b/servers/physics/body_sw.cpp @@ -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() { |