diff options
author | Chuyuan Fu <fuchuyuan.kelly@gmail.com> | 2019-08-13 14:56:26 -0700 |
---|---|---|
committer | Chuyuan Fu <fuchuyuan.kelly@gmail.com> | 2019-08-13 14:56:26 -0700 |
commit | b90097803e498e22fd61b7c7f44ceb05a91af0e2 (patch) | |
tree | 1d59c99f95fee330dc31db201f2c33964f0dab3b | |
parent | 3301b46367ea174f866465ce2ff7e1863aaf4a91 (diff) | |
download | bullet3-b90097803e498e22fd61b7c7f44ceb05a91af0e2.tar.gz |
update loading softbody
-rw-r--r-- | examples/SharedMemory/PhysicsServerCommandProcessor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index b8e0275cd..13a492674 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -7861,8 +7861,8 @@ bool PhysicsServerCommandProcessor::processLoadSoftBodyCommand(const struct Shar serverStatusOut.m_type = CMD_LOAD_SOFT_BODY_FAILED; bool hasStatus = true; #ifndef SKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD - double scale = 0.1; - double mass = 0.1; + double scale = 1; + double mass = 1; double collisionMargin = 0.02; const LoadSoftBodyArgs& loadSoftBodyArgs = clientCmd.m_loadSoftBodyArguments; if (m_data->m_verboseOutput) @@ -7944,9 +7944,9 @@ bool PhysicsServerCommandProcessor::processLoadSoftBodyCommand(const struct Shar //turn on softbody vs softbody collision psb->m_cfg.collisions |= btSoftBody::fCollision::VF_SS; psb->randomizeConstraints(); + psb->scale(btVector3(scale, scale, scale)); psb->rotate(initialOrn); psb->translate(initialPos); - psb->scale(btVector3(scale, scale, scale)); psb->setTotalMass(mass, true); psb->getCollisionShape()->setMargin(collisionMargin); |