diff --git a/props/prop_data_mesh_data.cpp b/props/prop_data_mesh_data.cpp index bc32089..e8a5f77 100644 --- a/props/prop_data_mesh_data.cpp +++ b/props/prop_data_mesh_data.cpp @@ -81,6 +81,16 @@ void PropDataMeshData::_processor_process(Ref prop_data, Node *node, c prop_data->add_prop(m); } +Node *PropDataMeshData::_processor_get_node_for(const Transform &transform) { + MeshDataInstance *i = memnew(MeshDataInstance); + + i->set_mesh_data(get_mesh()); + i->set_texture(get_texture()); + i->set_transform(transform * get_transform()); + + return i; +} + PropDataMeshData::PropDataMeshData() { _snap_to_mesh = false; _snap_axis = Vector3(0, 1, 0); diff --git a/props/prop_data_mesh_data.h b/props/prop_data_mesh_data.h index 6ec42f5..01e4f33 100644 --- a/props/prop_data_mesh_data.h +++ b/props/prop_data_mesh_data.h @@ -60,6 +60,7 @@ public: bool _processor_handles(Node *node); void _processor_process(Ref prop_data, Node *node, const Transform &transform); + Node *_processor_get_node_for(const Transform &transform); PropDataMeshData(); ~PropDataMeshData();