Is there any way to make a hollow circular ring

Why didn’t this torus fall down due to gravity? Is there any way to do this?

*const c1Mesh = BABYLON.MeshBuilder.CreateTorus("torus1", { diameter: 0.9, thickness: 0.05, tessellation: 48 }, scene);*
*  const c2Mesh = BABYLON.MeshBuilder.CreateTorus("torus2", { diameter: 0.8, thickness: 0.05, tessellation: 48 }, scene);*
*  await BABYLON.InitializeCSG2Async();*
*  const c1CSG = BABYLON.CSG2.FromMesh(c1Mesh);*
*  const c2CSG = BABYLON.CSG2.FromMesh(c2Mesh);*
*  const c1 = c1CSG.subtract(c2CSG).toMesh("newCirc");*
*  c1.position.set(circlePosX, circlePosY, circlePosZ);*
*  c1Mesh.dispose();*
*  c2Mesh.dispose();*

At first , I only used torus, but Torus seems not hollow, then I used the substract operation, but it doesn’t seem hollow yet.

go to playground

Do you use Physics engine and which one?

Create a PG please.

Yes,it’s Havok, @babylonjs/havok, when i remove the green clyinder,the Ring can fall down

Sorry ,what dou you mean by PG? I have used a PhysicsEngine

const circleAggregate = new BABYLON.PhysicsAggregate(c1, BABYLON.PhysicsShapeType.CYLINDER, {
      mass: 0.05, restitution: 0.1, startAsleep: true,
      friction: 1
    }, scene);

Playground

2 Likes

PG is Playground, so you can recreate a minimal reproduction of your issue on it: https://playground.babylonjs.com/ when you’re finished, save it:


and then copy the URL of the saved PG here:

This helps other clearly see what the problem might be.

2 Likes

Hi Dears,I have created a playground demo,Thank you!
test a ring fall down

1 Like

Instead of using PhysicsShapeType.CYLINDER use BABYLON.PhysicsShapeType.MESH for the ring.
Example - https://playground.babylonjs.com/#SFMBG6#16

3 Likes

For debugging, just turn this switch on, and it immediately becomes obvious why the ring isn’t falling down.

Your PG:

PG by @labris:

3 Likes