diff options
author | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2020-07-03 15:45:17 +0300 |
---|---|---|
committer | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2020-07-03 15:46:09 +0300 |
commit | dc446203beef386e8666f00a39b7b91a96505083 (patch) | |
tree | e5ea90230b1cc27c880e4322cf3c4b09175a3c9d /editor/plugins | |
parent | 772f693e5b8b5912d422e8effb8d6a72260edcfc (diff) |
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.
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/collision_shape_2d_editor_plugin.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp index 596629f8e8..105ac24950 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.cpp +++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp @@ -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: { |