-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Convex decomposing failed with CollisionPolygon2D PackedVector2Array size < 3 #45724
Comments
I post a similar issue while ago |
With Godot version 3.2.4 RC 3 over Ubuntu 18.04.5 LTS it also happens In the attached project you can test. You just have to open the Node2D.tscn scene, select the CollisionShape2D node, and in the node properties, change Shape to ConcavePolygonShape2D or ConvexPolygonShape2D and the editor closes. NOTE: In Godot 3.2.4 Beta 5 this error does not occur |
@jjmontes I've fixed |
Finding this error is occurring in 3.3.3. |
@Sslaxx Could you share your setup in a minimal project? It would help finding what case I missed with the last fix. |
Minimal, afraid not - not my work and I'm unsure of how to separate it. https://github.com/coderman64/flow-engine/tree/working - @coderman64 |
That helps, thanks! What are the repro steps? |
For me, the errors happened when attempting to resize the window. |
@Sslaxx Given the project assets, it seems these errors could be related to tilemaps, but I wasn't able to reproduce anything. Please open a separate issue with more details if you see it again or can give a bit more details about the context. |
I cannot confirm this is related to TileMaps. I'm having the same issue and it's very easy for me to replicate it without TileMap:
Minimal Reproduction Project: |
@golddotasksquestions Seems like the reason of the convex decomposing failing in your example is the repetition of the same point (which happens when you didn't move mouse between consecutive So even with your code I could draw a concave shape which was decomposed successfully (just have to be fast and precise enough): Disallowing such points should help for now:
It's easy to draw complex shape after such change: A proof showing duplicates are the cause (after a delay after releasing LMB removing duplicated points and reassigning them to the
|
@kleonc Still I think this should be more robust. If they are needed, I think these checks should happen under the hood. |
I'm getting this error when I call opaque_to_polygons() on a bitmap created from a specific png image I have. I'm using 3.4.2. It's a polygon with 85 points (i.e. more than 3), and I've checked for duplicate points, but it still happens. |
Please open a new issue with a minimal reproduction project attached. Edit: Issue opened: #57789 |
for me too |
Godot version:
1f7f27e
OS/device including version:
Windows 10 64bits
Nvidia GTX 1060 (driver 461.40)
Issue description:
While using CollisionPolygon2D with PackedVector2Array size < 3, editor show an error (not only the warning icon)
Steps to reproduce:
Just add node CollisionPolygon2D
Minimal reproduction project:
bugreport.zip
The text was updated successfully, but these errors were encountered: