PyBullet: handle the switch from fixed base to floating base when changing mass from zero to non-zero

This commit is contained in:
Erwin Coumans
2019-01-03 17:35:12 -08:00
parent bf9efffa4b
commit 19aafd5221
4 changed files with 54 additions and 1 deletions

View File

@@ -2652,7 +2652,7 @@ B3_SHARED_API int b3ChangeDynamicsInfoSetMass(b3SharedMemoryCommandHandle comman
{
struct SharedMemoryCommand* command = (struct SharedMemoryCommand*)commandHandle;
b3Assert(command->m_type == CMD_CHANGE_DYNAMICS_INFO);
b3Assert(mass > 0);
b3Assert(mass >= 0);
command->m_changeDynamicsInfoArgs.m_bodyUniqueId = bodyUniqueId;
command->m_changeDynamicsInfoArgs.m_linkIndex = linkIndex;
command->m_changeDynamicsInfoArgs.m_mass = mass;