Add basic editor editing for ConvexPolygonShape2D and ConcavePolygonShape2D

Adds basic editor tooling to move the existing points of a ConvexPolygonShape2D or move the  segments of a ConcavePolygonShape2D while a CollisionShape2D node is selected.
This commit is contained in:
smix8
2024-12-09 00:37:38 +01:00
parent cf038deb10
commit 7c84eba663
2 changed files with 71 additions and 3 deletions

View File

@@ -190,7 +190,7 @@ PackedStringArray CollisionShape2D::get_configuration_warnings() const {
Ref<ConvexPolygonShape2D> convex = shape;
Ref<ConcavePolygonShape2D> concave = shape;
if (convex.is_valid() || concave.is_valid()) {
warnings.push_back(RTR("Polygon-based shapes are not meant be used nor edited directly through the CollisionShape2D node. Please use the CollisionPolygon2D node instead."));
warnings.push_back(RTR("The CollisionShape2D node has limited editing options for polygon-based shapes. Consider using a CollisionPolygon2D node instead."));
}
return warnings;