diff options
| author | Marijn Tamis <[email protected]> | 2017-04-28 14:19:07 +0200 |
|---|---|---|
| committer | Marijn Tamis <[email protected]> | 2017-04-28 14:19:07 +0200 |
| commit | b350eb5f4d44e8448115796144375d79438d74ae (patch) | |
| tree | 8e102e8c28f45a1b87bd335ceee4f33c3d4ee7c2 /NvCloth/samples/SampleBase/scene/scenes/FreeFallScene.cpp | |
| parent | Add visual samples. (diff) | |
| download | nvcloth-b350eb5f4d44e8448115796144375d79438d74ae.tar.xz nvcloth-b350eb5f4d44e8448115796144375d79438d74ae.zip | |
NvCloth 1.1.0 Release. (22041545)
Diffstat (limited to 'NvCloth/samples/SampleBase/scene/scenes/FreeFallScene.cpp')
| -rw-r--r-- | NvCloth/samples/SampleBase/scene/scenes/FreeFallScene.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/NvCloth/samples/SampleBase/scene/scenes/FreeFallScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/FreeFallScene.cpp index c1f6a00..9cd1121 100644 --- a/NvCloth/samples/SampleBase/scene/scenes/FreeFallScene.cpp +++ b/NvCloth/samples/SampleBase/scene/scenes/FreeFallScene.cpp @@ -74,7 +74,7 @@ void FreeFallScene::initializeCloth(int index, physx::PxVec3 offset) mClothActor[index]->mCloth->setGravity(physx::PxVec3(0.0f, -1.0f, 0.0f)); mClothActor[index]->mCloth->setFriction(0.1); - mClothActor[index]->mCloth->setDragCoefficient(0.5); + mClothActor[index]->mCloth->setDragCoefficient(0.1); mClothActor[index]->mCloth->setLiftCoefficient(0.0); // Setup phase configs @@ -89,8 +89,6 @@ void FreeFallScene::initializeCloth(int index, physx::PxVec3 offset) } mClothActor[index]->mCloth->setPhaseConfig(nv::cloth::Range<nv::cloth::PhaseConfig>(&phases.front(), &phases.back())); - mSolver = getSceneController()->getFactory()->createSolver(); - trackSolver(mSolver); trackClothActor(mClothActor[index]); // Add the cloth to the solver for simulation @@ -99,12 +97,12 @@ void FreeFallScene::initializeCloth(int index, physx::PxVec3 offset) void FreeFallScene::onInitialize() { - float spaceX = -1.5f; + mSolver = getSceneController()->getFactory()->createSolver(); + trackSolver(mSolver); + float spaceX = -1.1f; for(int i = 0; i < 4; ++i) - { - initializeCloth(i, physx::PxVec3(16.f + float((i+1)*(i+1)) * spaceX, 2.f, -7.f)); - } + initializeCloth(i, physx::PxVec3(8.f + float((i+1)*(i+1)) * spaceX, 2.f, -7.f)); { IRenderMesh* mesh = getSceneController()->getRenderer().getPrimitiveRenderMesh(PrimitiveRenderMeshType::Plane); |