3d PieSlice from code

Hi everyone,
I’m trying to generate a PieSlice, similar on how 3ds max is doing for tube or cylinder with the slice option( slice from x1 degrees to x2 degrees)
Any idea where i should start looking into?

Hi @hhoria,

Is this for a 2D UI element use-case?

Hi, it would be 3d, I need it to visually show the measurement of angles between 2 surfaces

any screenshot of what you’re after?
It sounds like you could draw lines?


This is a slice from 0 to 90 degrees

Something similar, it can be purely flat, but I’d need it in 3d world space

It doesn’t necessarily need to be solid fill, it can be just the contour as well

You’d use mesh API and generate triangles as needed
https://developer.playcanvas.com/en/api/pc.Mesh.html

something along these lines (this generates 2D plane and later deforms it)
http://playcanvas.github.io/#/graphics/mesh-generation

similar example on how the engine generates cylinder primitive:

1 Like