Allow to request the state of a rigid body (position, orientation, lin/ang velocity) through shared memory API

PhysicsClientC_API: b3RequestActualStateCommandInit requires a body unique Id as second argument
This commit is contained in:
erwin coumans
2015-10-27 15:46:13 -07:00
parent 9cc2b1ec12
commit 2d5d89d999
7 changed files with 78 additions and 19 deletions

View File

@@ -229,8 +229,11 @@ void PhysicsClientExample::prepareAndSubmitCommand(int commandId)
case CMD_REQUEST_ACTUAL_STATE:
{
b3SharedMemoryCommandHandle commandHandle = b3RequestActualStateCommandInit(m_physicsClientHandle);
b3SubmitClientCommand(m_physicsClientHandle, commandHandle);
if (m_selectedBody>=0)
{
b3SharedMemoryCommandHandle commandHandle = b3RequestActualStateCommandInit(m_physicsClientHandle,m_selectedBody);
b3SubmitClientCommand(m_physicsClientHandle, commandHandle);
}
break;
};