Character Customization in BGE

A quick tutorial going over the simple method of empty + bone parenting a new item and then using logic and globalDict to load these values in game.

Enjoy :)!

1 Like

Cool. But couldn’t you use “replace mesh”? It would clear up some of those logic bricks. I know you can’t use replace mesh from an empty. But couldn’t you parent a cube, or plane, to the bone, then delete all but one vertex. Use that vertex to replace mesh?

Yes you can use this method instead, it would probably be easier as well. There could potentially be issues with rig scaling etc. but I would imagine they aren’t too hard to fix.

The problem with that is that each object you want to grab the mesh from would have to be parented to that exact armature. In multiplayer games, or games where you want other characters to change their hats, that would be chaos.

Hi Machelle; I don’t understand. It worked the same way as the empty parented (child of) to the bone in Tims video. Instead of the empty, it would be a plane with one vertex, (only so you wouldn’t see the plane) I would think less logic bricks would be less chaos. But I’ll take your word for it. :slight_smile:

I don’t think this is the case. You are only replacing the visual mesh not the object or location etc.
I set up a simple cube spinning with a child object and replaced the mesh of the child with no issues.
You might be referring to retrieving the mesh through python (which there only appears to be 2 ways: scene.object or own.children[0].mesh). These two only work with objects in the active scene/layer however if you use own.replaceMesh you can refer to objects outside of the active scene/layer.