Fix T39490: BGE: Text to Mesh, then MouseOver does not work

Non-mesh objects default to no collisions. lordloki provided a
patch that sets the collision properties for a mesh converted from
a curve/meta/surf/text to the default collision properties for
a mesh.
This commit is contained in:
Mitchell Stokes 2014-03-30 13:55:10 -07:00
parent 482201d1a0
commit f5b79dff41

@ -1478,8 +1478,13 @@ static void curvetomesh(Main *bmain, Scene *scene, Object *ob)
convert_ensure_curve_cache(bmain, scene, ob);
BKE_mesh_from_nurbs(ob); /* also does users */
if (ob->type == OB_MESH)
if (ob->type == OB_MESH) {
BKE_object_free_modifiers(ob);
/* Game engine defaults for mesh objects */
ob->body_type = OB_BODY_TYPE_STATIC;
ob->gameflag = OB_PROP | OB_COLLISION;
}
}
static int convert_poll(bContext *C)