1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Provide warning when using polygon shapes in CollisionShape2D node

`ConvexPolygonShape2D` and `ConcavePolygonShape2D` are only meant to be
used directly in code and not in the editor for physics-based use cases
specifically.

Developers are advised to use `CollisionPolygon2D` instead, which does
generate those shapes under the hood, handling polygon convexivity,
proper orientation etc.
This commit is contained in:
Andrii Doroshenko (Xrayez)
2020-07-03 15:45:17 +03:00
parent 772f693e5b
commit dc446203be
2 changed files with 7 additions and 2 deletions

View File

@@ -242,9 +242,11 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant &p_org) {
} break;
case CONCAVE_POLYGON_SHAPE: {
// Cannot be edited directly, use CollisionPolygon2D instead.
} break;
case CONVEX_POLYGON_SHAPE: {
// Cannot be edited directly, use CollisionPolygon2D instead.
} break;
case LINE_SHAPE: {