From e5edd50d6231dfc63b5309cbad56cdba05256a89 Mon Sep 17 00:00:00 2001 From: Victor Seiji Hariki Date: Mon, 26 Sep 2016 23:40:06 -0300 Subject: [PATCH] Now ignoring remaining collision shapes. --- servers/physics_2d/space_2d_sw.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index d0dcee77637..3d702ebb931 100644 --- a/servers/physics_2d/space_2d_sw.cpp +++ b/servers/physics_2d/space_2d_sw.cpp @@ -81,6 +81,9 @@ int Physics2DDirectSpaceStateSW::intersect_point(const Vector2& p_point,ShapeRes if (!shape->contains_point(local_point)) continue; + if (cc>=p_result_max) + continue; + r_results[cc].collider_id=col_obj->get_instance_id(); if (r_results[cc].collider_id!=0) r_results[cc].collider=ObjectDB::get_instance(r_results[cc].collider_id);