My application involves clicking 3d object to trigger GUI. I already read the tutorial about clicking on 3d object and I know that I have to add tag to the object I want it to be pickable:
But this way of adding tag to objects only works for objects that are loading independently. I mean, object1 and obejct2 have to be loaded separately from different model files. But what I should do if want to load the whole scene which includes multiple objects and add different tags to them? For example, I have a model of a building, which have many objects of doors, windows, walls, and furnishings. I want to trigger different events when user click doors, windows or other objects in the building. But it turns out when I load the building model into Panda3d, I can only set tag for the whole model - the building, but not for the objects in the building. I considered to load objects separately into the scene, but in that way I have to assemble the objects by code. It’s ridiculously troublesome to load the hundreds of building components separately and set their locations by code to assemble the whole building.
So is there anyone know how to set tags for objects separately included in model? Your any advices will be appreciated! I really need to figure it out.