Skip disabled shape when getting rest info. Fixes #25941

This commit is contained in:
Juan Linietsky 2019-02-16 16:32:30 -03:00
parent 6d4eaebe1e
commit 81e15358c0

View file

@ -1024,6 +1024,10 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
int to_shape = best_shape != -1 ? best_shape + 1 : p_body->get_shape_count();
for (int j = from_shape; j < to_shape; j++) {
if (p_body->is_shape_set_as_disabled(j))
continue;
Transform2D body_shape_xform = ugt * p_body->get_shape_transform(j);
Shape2DSW *body_shape = p_body->get_shape(j);