-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Add SolidShape2D class #16483
Add SolidShape2D class #16483
Conversation
The icon is strange because it's not solid. |
878aa7f
to
ebee554
Compare
scene/2d/solid_shape_2d.cpp
Outdated
@@ -0,0 +1,103 @@ | |||
/*************************************************************************/ | |||
/* solid_shape_2d.cpp */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*/
is not aligned. 😛
ebee554
to
4db47f1
Compare
Does this node support drawing only the edges, without pouring? |
@toby3d Nope, there is no edge only drawing support. All this class does is use the existing shape2d class to draw. I couldn't call it Shape 2D as it was taken so I went for Solid Shape 2D. If you have any suggestions for the name, let me know! |
@ianb96 Wait, Godot now support drawing simple figures by Shape2D? |
@toby3d No, Shape2D is just used to select the shape type, like circle, square, or arrow. It is used in CollisionShape2D, and it can draw to the screen, but only to show you what the collision will be like. You cannot make your own Shape2D Node to add to your scene. |
Solid looks like a physics object, it can be called Geometry2D instead (and probably make use of the new meshes in 2D and textures too, but first may need to be added as it is now). |
I Was thinking that, instead of this, a CSG system for 2D and 3D could be done.. |
A Constructive Solid Geometry system sounds good, I haven't heard of a 2D version of it before. |
We briefly discussed it with @reduz and feel that this would be better suited as a GDScript addon defining a custom node type, instead of new core Node. You can see CircleContainer for a 2.1 example of how to register such a custom node type. Sorry for the huge delay reviewing it though, we're still catching up with the 3.0 release backlog. |
SolidShape2D
Fixes #6750
Adds a new class SolidShape2D that draws a Shape2D to the screen.
Similar to Polygon2D but it draws a selected shape in a color.