mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-13 13:20:07 +00:00
immediately propagate forward kinematics + collision world transform, after 'INIT_POSE' command
This commit is contained in:
parent
6a0f095d5b
commit
c1f728ec86
@ -2313,6 +2313,18 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm
|
||||
dofIndex += mb->getLink(i).m_dofCount;
|
||||
}
|
||||
}
|
||||
|
||||
btAlignedObjectArray<btQuaternion> scratch_q;
|
||||
btAlignedObjectArray<btVector3> scratch_m;
|
||||
|
||||
mb->forwardKinematics(scratch_q,scratch_m);
|
||||
int nLinks = mb->getNumLinks();
|
||||
scratch_q.resize(nLinks+1);
|
||||
scratch_m.resize(nLinks+1);
|
||||
|
||||
mb->updateCollisionObjectWorldTransforms(scratch_q,scratch_m);
|
||||
|
||||
|
||||
}
|
||||
|
||||
SharedMemoryStatus& serverCmd =serverStatusOut;
|
||||
|
@ -119,8 +119,11 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
|
||||
printf("Say> ");
|
||||
#ifdef _WIN32
|
||||
gets_s(message, 1024);
|
||||
|
||||
#else
|
||||
gets(message);
|
||||
#endif
|
||||
if (strcmp(message, "exit") == 0 ||
|
||||
strcmp(message, "quit") == 0) {
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user