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

CollisionPolygon2D with polygon point count < 3 throw issue in debug console #19558

Closed
TotCac opened this issue Jun 14, 2018 · 4 comments
Closed

Comments

@TotCac
Copy link

TotCac commented Jun 14, 2018

Godot version:
current master

OS/device including version:
Windows 10 64bits

Issue description:
Creating a CollisionPolygon2D with polygon points < 3 throw error (not catched by editor) in debug console when saving scene or loading one
ERROR: canvas_item_add_polygon: Condition ' pointcount < 3 ' is true.
At: servers/visual/visual_server_canvas.cpp:668

Steps to reproduce:
Place CollisionPolygon2D with no additionnal properties and save the scene

Minimal reproduction project:
n/a

@Zylann
Copy link
Contributor

Zylann commented Jun 14, 2018

This is expected, the node cannot work if it doesn't have enough points to form the simplest 2D polygon possible (a triangle).
Did you expect the editor to prevent the user from setting less than 3 points up-front?

@TotCac
Copy link
Author

TotCac commented Jun 14, 2018

I expect having only a visual warning in the editor as it was before 2d meshes commit, not an error of the engine.
Because having an empty CollisionPolygon2D that you populate at runtime is needed sometimes.

@vlad-ed-git
Copy link

was about to post this issue too... it would be better if a warning was thrown not an error!

@Calinou
Copy link
Member

Calinou commented Feb 5, 2021

Closing in favor of #45724 as it's more up-to-date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants