ExtrudeShape does not seem to follow the path i give it

I’m using the extrudeShape method from the shape builder to extrude a facet on pick.

I’m path the path composed of the shape position and the (face position+ face normal)

I think it’s a bug within babylon.

I’ll let you check my implementation here: https://playground.babylonjs.com/#X3UQ4P#9

Adding @JohnK who may be able to help :slight_smile:

Hi @Tawfik and welcome to the forum from me.

Possibly to do with how you determine the shape to extrude. My method uses a ribbon rather than extrudeShape (which by the way uses createRibbon to build the extrusion)

Extrusions restricted to box https://playground.babylonjs.com/#X3UQ4P#10
Extrude from any mesh https://playground.babylonjs.com/#X3UQ4P#11

2 Likes

okey but we’re using createRubbon instead of extrudeShape.

should i open an issue on the github repo?

From my point of view your code is somewhat too complex for me to spend time checking especially as I doubt it is a Babylonjs error. You could do a couple of checks by drawing your shape to extrude with CreateLines and the same for your path.

You could use ExtrudeShape with my method however to set the shape to extrude you would need to rotate the facet so that it lies on the xy plane and then read its rotated vertex positions

2 Likes