summaryrefslogtreecommitdiff
path: root/servers/physics_3d
diff options
context:
space:
mode:
authorfabriceci <fabricecipolla@gmail.com>2022-08-22 16:47:39 +0200
committerfabriceci <fabricecipolla@gmail.com>2022-09-19 16:51:41 +0200
commit7a15ccfa7b45d26533e9d959599dc0d322b7f160 (patch)
treef5408e79f7bbd190fa9662c03f2ee23337812f95 /servers/physics_3d
parent6f5704d86f95171ba8b6b2ac9f56e284c4d35d7a (diff)
Warn users when collisions are not supported
Diffstat (limited to 'servers/physics_3d')
-rw-r--r--servers/physics_3d/godot_collision_solver_3d.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/servers/physics_3d/godot_collision_solver_3d.cpp b/servers/physics_3d/godot_collision_solver_3d.cpp
index 094d77a582..9fe0e3eb84 100644
--- a/servers/physics_3d/godot_collision_solver_3d.cpp
+++ b/servers/physics_3d/godot_collision_solver_3d.cpp
@@ -370,12 +370,15 @@ bool GodotCollisionSolver3D::solve_static(const GodotShape3D *p_shape_A, const T
if (type_A == PhysicsServer3D::SHAPE_WORLD_BOUNDARY) {
if (type_B == PhysicsServer3D::SHAPE_WORLD_BOUNDARY) {
+ WARN_PRINT_ONCE("Collisions between world boundaries are not supported.");
return false;
}
if (type_B == PhysicsServer3D::SHAPE_SEPARATION_RAY) {
+ WARN_PRINT_ONCE("Collisions between world boundaries and rays are not supported.");
return false;
}
if (type_B == PhysicsServer3D::SHAPE_SOFT_BODY) {
+ WARN_PRINT_ONCE("Collisions between world boundaries and soft bodies are not supported.");
return false;
}
@@ -387,6 +390,7 @@ bool GodotCollisionSolver3D::solve_static(const GodotShape3D *p_shape_A, const T
} else if (type_A == PhysicsServer3D::SHAPE_SEPARATION_RAY) {
if (type_B == PhysicsServer3D::SHAPE_SEPARATION_RAY) {
+ WARN_PRINT_ONCE("Collisions between rays are not supported.");
return false;
}
@@ -398,7 +402,7 @@ bool GodotCollisionSolver3D::solve_static(const GodotShape3D *p_shape_A, const T
} else if (type_B == PhysicsServer3D::SHAPE_SOFT_BODY) {
if (type_A == PhysicsServer3D::SHAPE_SOFT_BODY) {
- // Soft Body / Soft Body not supported.
+ WARN_PRINT_ONCE("Collisions between soft bodies are not supported.");
return false;
}
@@ -410,6 +414,7 @@ bool GodotCollisionSolver3D::solve_static(const GodotShape3D *p_shape_A, const T
} else if (concave_B) {
if (concave_A) {
+ WARN_PRINT_ONCE("Collisions between two concave shapes are not supported.");
return false;
}