forked from bartvdbraak/blender
rigidbody: Fix [#34108] Rigid body with no polygons crashes blender
Fall back to using box shape in case creating shape from mesh fails.
This commit is contained in:
parent
9d8ec8b30f
commit
ace88b6962
@ -416,6 +416,10 @@ void BKE_rigidbody_validate_sim_shape(Object *ob, short rebuild)
|
||||
rbo->physics_shape = new_shape;
|
||||
RB_shape_set_margin(rbo->physics_shape, RBO_GET_MARGIN(rbo));
|
||||
}
|
||||
else { /* otherwise fall back to box shape */
|
||||
rbo->shape = RB_SHAPE_BOX;
|
||||
BKE_rigidbody_validate_sim_shape(ob, true);
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user