summaryrefslogtreecommitdiff
path: root/servers/physics_2d
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_2d
parent6f5704d86f95171ba8b6b2ac9f56e284c4d35d7a (diff)
Warn users when collisions are not supported
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/godot_collision_solver_2d.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/physics_2d/godot_collision_solver_2d.cpp b/servers/physics_2d/godot_collision_solver_2d.cpp
index 761a1c33e2..52237539c0 100644
--- a/servers/physics_2d/godot_collision_solver_2d.cpp
+++ b/servers/physics_2d/godot_collision_solver_2d.cpp
@@ -229,6 +229,7 @@ bool GodotCollisionSolver2D::solve(const GodotShape2D *p_shape_A, const Transfor
if (type_A == PhysicsServer2D::SHAPE_WORLD_BOUNDARY) {
if (type_B == PhysicsServer2D::SHAPE_WORLD_BOUNDARY) {
+ WARN_PRINT_ONCE("Collisions between world boundaries are not supported.");
return false;
}
@@ -240,6 +241,7 @@ bool GodotCollisionSolver2D::solve(const GodotShape2D *p_shape_A, const Transfor
} else if (type_A == PhysicsServer2D::SHAPE_SEPARATION_RAY) {
if (type_B == PhysicsServer2D::SHAPE_SEPARATION_RAY) {
+ WARN_PRINT_ONCE("Collisions between two rays are not supported.");
return false; //no ray-ray
}
@@ -251,6 +253,7 @@ bool GodotCollisionSolver2D::solve(const GodotShape2D *p_shape_A, const Transfor
} else if (concave_B) {
if (concave_A) {
+ WARN_PRINT_ONCE("Collisions between two concave shapes are not supported.");
return false;
}