+1 vote

Full error

0:00:00:0660 - Condition ' pointcount < 3 ' is true.
----------
Type:Error
Description: 
Time: 0:00:00:0660
C Error: Condition ' pointcount < 3 ' is true.
C Source: servers\visual\visual_server_canvas.cpp:664
C Function: VisualServerCanvas::canvas_item_add_polygon

That doesn't tell me where it's coming from in my code. Any ideas what can cause this?

in Engine by (693 points)

My best guess is that you have a collision shape somewhere with fewer than 3 vertices while Visible Collision Shapes is enabled.

Disabling visible collision shapes did make the error go away. Would this occur if I am using a 2D circle shape? I think that's the only shape with less than 3 vertices.

I couldn't get the CircleShape2D to give this error. Either it worked correctly or I got a Bad Polygon error (with a radius of 0). The only shape I know how to generate the error for is ConvexShape2D since I have direct access to its vertices. I can't seem to create the error for the other CollisionShape2D resources.

Thanks for checking it out! What if you had an empty CollisionPolygon2D? My overall parent has this, but a child is using the Shape as a circle. So in my script I delete the CP2D on _ready, but maybe that's where the error is coming from?

1 Answer

+2 votes
Best answer

Issue was that I had Visible Collision Shapes on, and an empty Collision Polygon.

by (693 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.