Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow loading a polygon as a starting mesh #55

Open
Zireael07 opened this issue Mar 16, 2022 · 3 comments
Open

Allow loading a polygon as a starting mesh #55

Zireael07 opened this issue Mar 16, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@Zireael07
Copy link

Is your feature request related to a problem? Please describe.
Instead of having to put a quad, then subdivide/move vertices etc, it would be easier if I could just use a polygon2d as the starting point. Extruding a polygon (that can be triangulated by Geometry.triangulate_polygon2d() ) will always be manifold, so you can just reject any that returns an empty array from triangulate_polygon2d()

Describe the solution you'd like
Trying to speed up my own workflows for the car game - my car starts as a 2d polygon that outlines the shape of the car that is then extruded. I used to do it by hand with my own suite of helper scripts, but this addon is awesome and modular and would make my job much easier <3

(CSG doesn't cut it because literally, I can cut the holes for the windows but I can't then fill them in :P )

Additional context
Add any other context or screenshots about the feature request here.

@jarneson jarneson added the enhancement New feature or request label Mar 16, 2022
@jarneson
Copy link
Owner

https://github.com/jarneson/godot-ply/blob/main/addons/ply/resources/generate.gd has a function nGon that can work for this, just pass in the vertices. perhaps some way of extending the generate modal to pick a polygon2d or just allow an arbitrary list of verts.

@Zireael07
Copy link
Author

Yep, the nGon works :) Having fun cutting out the shape of the window rn ;)

@Zireael07
Copy link
Author

Here's an old Godot addon that has a working polygon editor: https://github.com/ppiecuch/godot-addons/blob/master/add_primitives/src/modules/Polygon.gd (link directly to polygon editor) :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants