summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorMarcus Elg <marcusaccounts@yahoo.se>2022-12-19 19:37:22 +0100
committerMarcus Elg <marcusaccounts@yahoo.se>2022-12-19 19:37:22 +0100
commita39d8948113180fc914deb908c45fdb23370e704 (patch)
tree658f598bb4d15a7f04406d25f337f01057a5a7b3 /scene/3d
parent0bb94df247a0a0c22333e2e99744fc3fd184601a (diff)
Show warning when having a worldboundaryshape as a child of a rigidbody
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/collision_shape_3d.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/scene/3d/collision_shape_3d.cpp b/scene/3d/collision_shape_3d.cpp
index ef381641ab..2729dfc369 100644
--- a/scene/3d/collision_shape_3d.cpp
+++ b/scene/3d/collision_shape_3d.cpp
@@ -34,6 +34,7 @@
#include "physics_body_3d.h"
#include "scene/resources/concave_polygon_shape_3d.h"
#include "scene/resources/convex_polygon_shape_3d.h"
+#include "scene/resources/world_boundary_shape_3d.h"
void CollisionShape3D::make_convex_from_siblings() {
Node *p = get_parent();
@@ -125,10 +126,12 @@ PackedStringArray CollisionShape3D::get_configuration_warnings() const {
warnings.push_back(RTR("A shape must be provided for CollisionShape3D to function. Please create a shape resource for it."));
}
- if (shape.is_valid() &&
- Object::cast_to<RigidBody3D>(get_parent()) &&
- Object::cast_to<ConcavePolygonShape3D>(*shape)) {
- warnings.push_back(RTR("ConcavePolygonShape3D doesn't support RigidBody3D in another mode than static."));
+ if (shape.is_valid() && Object::cast_to<RigidBody3D>(get_parent())) {
+ if (Object::cast_to<ConcavePolygonShape3D>(*shape)) {
+ warnings.push_back(RTR("ConcavePolygonShape3D doesn't support RigidBody3D in another mode than static."));
+ } else if (Object::cast_to<WorldBoundaryShape3D>(*shape)) {
+ warnings.push_back(RTR("WorldBoundaryShape3D doesn't support RigidBody3D in another mode than static."));
+ }
}
return warnings;