You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the inertia calculation comes out wildly different when scaling a lone btConvexHullShape and when wrapping it with a btUniformScalingShape and scaling that instead.
In btUniformScalingShape::calculateLocalInertia it multiplies the inertia by the uniform scale. However, inertia is proportional to r^2 and thus it should be multiplying by scale^2. This should be analytically correct.
voidbtUniformScalingShape::calculateLocalInertia(btScalar mass, btVector3& inertia) const
{
// this linear upscaling is not realistic, but we don't deal with large mass// ratios...
btVector3 tmpInertia;
m_childConvexShape->calculateLocalInertia(mass, tmpInertia);
inertia = tmpInertia * m_uniformScalingFactor;
}
This discussion was converted from issue #1792 on April 26, 2021 03:54.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that the inertia calculation comes out wildly different when scaling a lone btConvexHullShape and when wrapping it with a btUniformScalingShape and scaling that instead.
In btUniformScalingShape::calculateLocalInertia it multiplies the inertia by the uniform scale. However, inertia is proportional to r^2 and thus it should be multiplying by scale^2. This should be analytically correct.
Beta Was this translation helpful? Give feedback.
All reactions