From 1881f6679a8df4392bc387ffb0788122f310be9a Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Fri, 15 Sep 2017 15:38:24 -0700 Subject: [PATCH] fix issue with rendering of certain capsules from MJCF files. --- examples/ExampleBrowser/OpenGLGuiHelper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/ExampleBrowser/OpenGLGuiHelper.cpp b/examples/ExampleBrowser/OpenGLGuiHelper.cpp index 5ab2e547f..22dad40ea 100644 --- a/examples/ExampleBrowser/OpenGLGuiHelper.cpp +++ b/examples/ExampleBrowser/OpenGLGuiHelper.cpp @@ -629,12 +629,13 @@ void OpenGLGuiHelper::createCollisionShapeGraphicsObject(btCollisionShape* colli textured_detailed_sphere_vertices[i*9+1], textured_detailed_sphere_vertices[i*9+2]); - btVector3 trVer = compound->getChildTransform(0)*(radiusScale*vert); + btVector3 trVer = (radiusScale*vert); if (trVer[up]>0) trVer[up]+=halfHeight; else trVer[up]-=halfHeight; + trVer = compound->getChildTransform(0)*trVer; transformedVertices[i*9+0] = trVer[0]; transformedVertices[i*9+1] = trVer[1];