This thing has been bothering my simple mind for some time.
Blender game engine allows us to change object’s mesh, which is great.
However what boggles me, is the fact that one object can contain only one Mesh in it.
So if we have a lot of meshes to swap between, we still need one object containing that Mesh in it?
(As a side note, I know I’m simple minded and I have somehow gotten used to think that one Mesh per one physical form).
If cows could fly and pigs weren’t pink, would it be a crazy idea that Objects could actually hold multiple Mesh datas in them
and it would be assigned/selected which Mesh were in use.
Sorry if this sounds like a weird question, but this is more of a organizing question during development than actual game problem.
I have worked around this keeping all the objects containing swappable Meshes under and Empty object as a child to keep my Outliner clean.
Hello
dear Mperonen, its your lucky day, because one Blender Object can have multiple Meshes ( if I understood well your “question”)
Add your desired Object/Meshes to the scene, select the “Master” object, then in the “Mesh Panel” choose the one you want to assign to it ( press the F button to each one).
When done, you can delete the “original” added Object/Meshes.
Bye
game objects and mesh objects are two different kind of objects.
While game objects have logic and a position in 3D space, a mesh object describes a visible representation. The relationship is pretty simple:
A game object has a mesh.
But it does not need to e.g. empties, font objects do not have a mesh at all.
You can assign a different mesh (in-game) as long as this mesh exists in the BGE scene. There are several options to get a mesh into the BGE scene:
A) by assigning the mesh to a active or inactive object (in Blender).
B) by referring to the mesh with the replace mesh actuator (in Blender).
C) by loading a mesh with LibLoad (in-game)
There might be more, but this are the typical use-cases.
Be aware:
removing an object in-game might remove the assigned mesh too (if there is no other reference to it)