Make single outline for different meshes

Hello folks, I have this playground: Babylon.js Playground

As you can see, outline of spheres intersects with tube outline. Is it possible to make single outline for these spheres and tube?

P.S. I need to dynamically adjust length of my tube without creating new mesh each time when I need to change length of my shape. So, using Capsule shape and scaling or recreating it each time is not an option.

This is a “by-product” of the technique used. In your case, you can try to draw the tube first, to avoid certain artifacts, but you’ll still see the outline of the top and bottom of the tube, which you probably don’t want :

I can’t see how to make it work, because it’s actually 3 meshes, so you’ll get 3 outlines.

2 Likes

Okay, thanks for quick answer