# Soft body rope from extruded mesh playground example could be updated

**URL:** <https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454>\
**Category:** Bugs\
**Created:** [December 9, 2020, 8:41am UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454 "2020-12-09T08:41:56Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [December 9, 2020, 8:41am UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/1 "2020-12-09T08:41:56Z")

</div>

This is not really a bug. More of a suggestion to may be update the playground example for:  
‘[playground.babylonjs.com/#8WC6ZN#5](http://playground.babylonjs.com/#8WC6ZN#5)’

I was quickly looking back at the rope soft body when I saw this small glitch in the doc example(s). Because the shape is not closed, the rope appears glitchy (depending on camera angle and rope stretch). You can best see it when looking from the side.

 ![Capture d’écran 2020-12-09 à 09.39.52](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/1/1e8879336a11b4b926272560ec06e75793b826ca.png)  
Closing the shape (adding one point at start) solves the problem, as shown here with this quick twist of mine:  
‘[playground.babylonjs.com/#8WC6ZN#119](http://playground.babylonjs.com/#8WC6ZN#119)’

I didn’t want to change the code so I simply added 0.1 to the value of ’ i \< 2 \* Math.PI ’ to force adding one more point on extrusion. Feel free to do a cleaner code;) and then may be update this part for newcomers.

Edit: oops, just found another one same problem over here:  
‘[https://playground.babylonjs.com/#8WC6ZN#2](https://playground.babylonjs.com/#8WC6ZN#2)’

Thinking of it, there might be others with the same issue (for all or some of .MeshBuilder)…

Edit: this could also be the case with ‘.ExtrudeShape’ used for some of the rope examples. There is something with these constructors and closing path VS not… just something…

---

<div class="post-metadata">

**Author:** ![nekochanoide](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nekochanoide/32/12431_2.png) [@nekochanoide](https://forum.babylonjs.com/u/nekochanoide)\
**Post date:** [December 9, 2020, 10:26am UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/2 "2020-12-09T10:26:23Z")

</div>

I can’t open your playgrounds

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [December 9, 2020, 10:31am UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/3 "2020-12-09T10:31:37Z")

</div>

What do you mean? These aren’t my playgrounds. They are the ones from the doc.  
Simply goto  
‘[Soft Bodies | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/physics/softBodies#the-rope-soft-body)’  
and check on the examples with a mesh (in section rope)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 9, 2020, 4:14pm UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/4 "2020-12-09T16:14:41Z")

</div>

Adding @PirateJC for the updates 😉

---

<div class="post-metadata">

**Author:** ![PirateJC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/piratejc/32/1003_2.png) [@PirateJC](https://forum.babylonjs.com/u/PirateJC)\
**Post date:** [December 9, 2020, 11:41pm UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/5 "2020-12-09T23:41:23Z")

</div>

Hey @mawa - Happy to update these.

The original links you posted look like they are to the default playground.

If you can give me before/after playgrounds, I’d be more than happy to swap them out.

Just need a list of which ones you think should be changed, and links of what they should be changed to.

Thanks a million for being vigilant and keeping an eye out for places the docs can be better! You rock!

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [December 10, 2020, 11:09am UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/6 "2020-12-10T11:09:49Z")

</div>

I have just updated my posts so now you should have the links.  
Incidentally, this simply raises another comment/suggestion of mine. It seems that if I was to simply copy/paste the playground link in the forum (without quotes), the link doesn’t take the # (or something… I didn’t investigate).  
Same thing for the code of your playground examples @PirateJC, I’m not really willing to give you the code you will want to showcase for the doc examples (I’m not even sure I have the skills for that yet 🤔 I just wanted to let you know about the result (glitches). Yours to fix whatever you think needs to be fixed/improved.  
Have a great day 😄

---

<div class="post-metadata">

**Author:** ![PirateJC](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/piratejc/32/1003_2.png) [@PirateJC](https://forum.babylonjs.com/u/PirateJC)\
**Post date:** [December 10, 2020, 6:12pm UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/7 "2020-12-10T18:12:55Z")

</div>

Thanks @mawa - We’ll have a look at them

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 10, 2020, 6:53pm UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/8 "2020-12-10T18:53:26Z")

</div>

I’m taking a look

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 11, 2020, 1:48pm UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/9 "2020-12-11T13:48:07Z")

</div>

I can confirm it’s a simple rendering issue that is fixed by the solution provided by @mawa  
I’m updating the PG and the documentation

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 11, 2020, 1:55pm UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/10 "2020-12-11T13:55:43Z")

</div>

PR [fix non-closed extruded shapes for rope PG examples by CedricGuillemet · Pull Request #110 · BabylonJS/Documentation · GitHub](https://github.com/BabylonJS/Documentation/pull/110)

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [December 12, 2020, 10:49am UTC](https://forum.babylonjs.com/t/soft-body-rope-from-extruded-mesh-playground-example-could-be-updated/16454/11 "2020-12-12T10:49:20Z")

</div>

Did I just see you implement my ‘hack’/twist ?  
Seriously, " for(var i = 0; i \< 2 \* Math.PI **+ 0.01** ; i += Math.PI / 8) " is that the best you engineers can come up with to fix what seems to be an issue (or misunderstanding) with a constructor? Ya know, yours ENGs are sometimes such a bunch of lazy people 😉 when you think the topic is ‘too simple’ and can be ‘disregarded’ (hear the love in my voice). Mind your steps ENGs, I can see you 🧐

Edit: Sorry, I will have to edit this. 🤐After teasing you on your work (this is something we love to do between designers and eng’s don’t we?😉 😀 I thought I would have to do my share and went back this morning looking at these extrusions and I finally saw what you did in the other PGs (or what has been done previously, I don’t know). In fine, it is when you push the points, right?. This is where, you instruct to close the path using  
“myShape.push(myShape[0]); //close profile”  
as in your PG example  
’ [https://playground.babylonjs.com/#ZMKN5T#1](https://playground.babylonjs.com/#ZMKN5T#1)’

If I was to simply do this “myShape.push”, the profile/path would not close (or else I would need to add the last point and then it would).  
Still I don’t find my dirty twist to make a closed circle very sexy (and we should may be add a comment to explain what this value of 0.1 or 0.01 depending on PG example, is actually here for.  
Have a great sunday and thanks again for this awesome framework.  
You guys rock
