From ea406eba44e2d000a1c6bd53910869cc44b124d2 Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Sun, 15 Jul 2018 15:25:56 -0300 Subject: [PATCH] skip dynamic bodies --- src/bounce/dynamics/cloth/cloth.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bounce/dynamics/cloth/cloth.cpp b/src/bounce/dynamics/cloth/cloth.cpp index f13f231..981536a 100644 --- a/src/bounce/dynamics/cloth/cloth.cpp +++ b/src/bounce/dynamics/cloth/cloth.cpp @@ -160,6 +160,7 @@ b3Cloth::b3Cloth(const b3ClothDef& def, b3World* world) : m_particleBlocks(sizeo m_world = world; m_mesh = def.mesh; m_density = def.density; + m_xf.SetIdentity(); b3ClothMesh* m = m_mesh; @@ -537,6 +538,11 @@ void b3Cloth::UpdateContacts() for (b3Body* body = m_world->GetBodyList().m_head; body; body = body->GetNext()) { + if (body->GetType() != e_staticBody) + { + continue; + } + b3Transform xf = body->GetTransform(); for (b3Shape* shape = body->GetShapeList().m_head; shape; shape = shape->GetNext()) {