1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +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.

(cherry picked from commit dc446203be)
This commit is contained in:
Andrii Doroshenko (Xrayez)
2020-07-03 15:45:17 +03:00
committed by Rémi Verschelde
parent d4d57476ad
commit 41f99c8f53
2 changed files with 7 additions and 4 deletions

View File

@@ -249,11 +249,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: {