Request for Pentagons and Hexagons

Avatar
  • updated
  • Completed

Hey!
It would be nice if the shapes library also supported regular pentagons and regular hexagons out of the box instead of having to construct them out of quads (I know, I'm lazy!).

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Completed

this has now been added in the version after 2.2.0!

Avatar
Phillip Zolla
Quote from Phillip Zolla

Image 652

Something like this.  I was able to use Shapes for all cell versions in a cell grid except for this one.

Avatar
Phillip Zolla
Quote from Freya Holmér

there's not! what shape would you expect it to have?

Image 652

Avatar
Freya Holmér creator
Quote from Phillip Zolla

Is there a 3D version?

there's not! what shape would you expect it to have?

Avatar
Phillip Zolla

Is there a 3D version?

Avatar
Freya Holmér creator
  • Answer
  • Completed

this has now been added in the version after 2.2.0!

Avatar
Andy M

Related - you can easily break the quad by making it non-convex given it only splits one-way.

So in time you may have to allow any number of points polygons!

Avatar
Freya Holmér creator
  • Planned

yeah!

so, gets a little complicated because there are like three routes I can go with this

  • I can make this a feature of the disc, where you can either have it be a circle, or, an n-sided regular polygon
    • this is nice because they are very similar in the features they should have
    • a downside of this though, is that hollow dashed polygons might get very complicated
  • I can make it a separate component similar to the disc
    • this is neat because I don't have to make sure to support all disc features (start/end angle, dashed, etc)
    • I could also add specialized things like corner radius
  • I can make it a separate component similar to the quad
    • The quad/triangle primitives are specifically per-vertex positioned stuff
    • this means it'd basically be a convex polygon component
    • although, this is a bit of a different thing. it's more flexible, but it's also something people would expect to also support being non-convex
    • also harder to anti-alias (for the same reason the quad and triangle don't have LAA

I'll likely go for the second option! with the last one coming at some later point, since triangulation in and of itself is a whole can of worms~