Physics for hollow cylinder

Hello everyone,

I’m new to “babylonjs” - just started exploring this wonderful rendering engine.

I have a relatively simple task to accomplish - fill in hollow cylinder with the bunch of marbles.
I don’t have any problems with modelling but at the moment I’m a bit stuck with the physics. As far as I understand, there is no “PhysicsImpostor” for hollow cylinder out of the box so I decided to create a “.babylon” object with Blender and use AbstractMesh + MeshImpostor. Unfortunately the problem stays the same: my marble is not going inside.

I see there are some workarounds:

Any tips / suggestions are very welcome.
Thank you.

Playground: Babylon.js Playground

pinging @RaananW or @Cedric

1 Like

Hi @thgala

MeshImpostor should work just like in the pointed samples. Let me check that :slight_smile:

The mass for the cylinder mesh impostor was not 0. MeshImpostor only works for non dynamic mesh with a mass of 0.

https://www.babylonjs-playground.com/#8JBDTT#1

2 Likes

Jesus! Thanks a lot for incredibly fast response.
Same @Deltakosh

1 Like

@Cedric Is there any other alternative way can apply physics to merged mesh(CSG) with mass or it’s impossible at all? Adding colliders manually (Babylon.js Playground) can be a solution but what should I do when the mesh is created by subtraction?

New Physics system will be released in a few weeks along Babylon 6.0 and it should support that feature.
Or, addition collision manually like in the PG you posted but with more colliders.

1 Like