BUG or NOT: Parented DupliGroup not translating with parent

Hey everyone,

I’m making a tech demo of sorts in BGE and I’ve decided to make it a FPS type thing. I have the FPS movement and everything done, but now I want to add a weapon in the viewport. I’ve made the weapon, added it to a group, linked the group from an external .blend into my main .blend file and made a dupli from that group.

My problem is that when I parent my dupli’d weapon to my FPS guy it just hangs in mid air and doesn’t follow him around. I tried doing this with other, internal duplis and the same problem persists…

I know that there is a mechanic to do this, in Yo Frankie you can carry critters and stuff around, so it must be possible.

Did Frankie just update the position and rotation of the critters on each update or is the critter properly parented to him?

Thanks for any help, guys and gals.

this isnt a bug, the dupligroup object is not actually added to the BGE, only the objects that it instances, this means these objects wont have any relationship with the empty’s parent.

Would it be possible to add the unparented objects in the dupligroup to the dupligroup’s parent? As part of the Blender > game engine interchange, I mean.

Is there a workaround for this? How would you go about parenting something to a group instance? eg, a camera?

Evilkiller… maybe you could link the weapon into the player’s .blend file, and then add it to the group?

-Sam

I prepared an example of a way to set parent for goups. This way works for single instances only. See the “aareadme” texts for details.

I hope it helps.

Attachments

ParentGroupsLibrary.blend (153 KB)ParentGroupsMain.blend (130 KB)

Monster: fantastic, this is just what I need. Thanks.

EDIT: You mention that to make this work for multiple instances, you need to be able to distinguish between instances. Does anybody know how you could do this? It seems to me that each object has the same name - how does the BGE tell them apart?

Before I go and number each instance, does an index number like this already exist?

i think auto parenting the group’s root parents (objects with no parent) to the dupligroup generator can resolve a lot of issues, for example this issue of parent transformation, and more importantly, IPO animation inside the group, it looks fine in blender, but in the BGE translation curves is are “moved” to the global coordinte origin, which is not right. though a problem could arise with dynamic objects (like duplic character setups)… maybe put it as an option in the logic panel of a dupligroup instance, a “parent” button that will make that dupligroup be parented to the instancer object… still is a bit clunky, but i have run out of ideas

I prepared two scripts that can perform this kind of parenting. See this thread

I hope it helps
Monster