diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index 708ea7463..ff6ad05ee 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -3616,7 +3616,20 @@ bool PhysicsServerCommandProcessor::loadUrdf(const char* fileName, const btVecto { bool use_self_collision = false; use_self_collision = (flags & CUF_USE_SELF_COLLISION); - return processDeformable(u2b.getDeformableModel(), pos, orn, bodyUniqueIdPtr, bufferServerToClient, bufferSizeInBytes, globalScaling, use_self_collision); + bool ok = processDeformable(u2b.getDeformableModel(), pos, orn, bodyUniqueIdPtr, bufferServerToClient, bufferSizeInBytes, globalScaling, use_self_collision); + if (ok) + { + const UrdfModel* urdfModel = u2b.getUrdfModel(); + if (urdfModel) + { + addUserData(urdfModel->m_userData, *bodyUniqueIdPtr); + } + return true; + } + else + { + return false; + } } bool ok = processImportedObjects(fileName, bufferServerToClient, bufferSizeInBytes, useMultiBody, flags, u2b); if (ok)