summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerwincoumans <erwincoumans@google.com>2019-08-14 21:14:10 -0700
committerGitHub <noreply@github.com>2019-08-14 21:14:10 -0700
commit6feb1b25db3d3730721fbb7ce8d600f973e0e174 (patch)
tree232fbf30b5f5ba6a19ba6d68edcacbb511c9a9e9
parent7fa70c3857ab8ea38c80462785d788438f69fcb9 (diff)
parentb90097803e498e22fd61b7c7f44ceb05a91af0e2 (diff)
downloadbullet3-6feb1b25db3d3730721fbb7ce8d600f973e0e174.tar.gz
Merge pull request #2365 from fuchuyuan/updateLoadingSoftBody
update loading softbody
-rw-r--r--examples/SharedMemory/PhysicsServerCommandProcessor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp
index 961fc617a..2b1dea869 100644
--- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp
+++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp
@@ -7862,8 +7862,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)
@@ -7946,9 +7946,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);