diff options
author | Victor Seiji Hariki <seijihariki@seiji-desktop.home.hariki> | 2016-09-26 23:40:06 -0300 |
---|---|---|
committer | Victor Seiji Hariki <seijihariki@seiji-desktop.home.hariki> | 2016-09-26 23:40:06 -0300 |
commit | e5edd50d6231dfc63b5309cbad56cdba05256a89 (patch) | |
tree | 5c9b6add9f1916543a8d12a01bc9c4ce828c9d57 /servers/physics_2d | |
parent | 73a7b91459fc18013e51e8c4dfbcc7a309d6b1e2 (diff) |
Now ignoring remaining collision shapes.
Diffstat (limited to 'servers/physics_2d')
-rw-r--r-- | servers/physics_2d/space_2d_sw.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp index d0dcee7763..3d702ebb93 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); |