let’s say i have two models splitted in a bunch of meshes with key vertex (those witch keeps meshes “attached”) how do i switch meshes between them ?
or if you prefear:
i have my Robot1 witch has his Armature and a Arms mesh and i want that when i press left arrow Robot1 uses Arms mesh of Robo2->Armature and so on.
change the mesh filter will work ?
none as ever tried customizable characters? or things like that ?
could the use of layers lead to performance issue or invisible items are not considered at all so they don’t affect FPS ?
I’m sorry, but I just plainly do not understand the question in your initial post. I understand that you want to do some kind of mesh switching, but I do not understand your description / example.
ok let’s say ha have modelled my robots with arms torso legs and head on separated mesh in the same blender file
when i import them i see the structure like this Robot1->Armature->Arms,Head,Legs,Torso
they are all skinned and animated correctly but i want something like a “build your own”(combine your own maybe is better) function in my game so i was looking for a method to replace the current arm mesh with another(cycling trough a series of arms modelled on the same base), keeping my animation
found!
Can someone explain me how to access objects? i didn’t manage to use once?
i did this way so i can set things via gui but since i plan to have a lots of mesh its better for me to be an autogenerated array based on the name maybe
arm.001 arm.002 and so on
var bracciaIniziali : GameObject;
var braccia2 : GameObject;
function Start ()
{
bracciaIniziali.SetActiveRecursively(true);
braccia2.SetActiveRecursively(false);
}
function Update ()
{
if (Input.GetKey("left")){
bracciaIniziali.SetActiveRecursively(false);
braccia2.SetActiveRecursively(true);
}
if (Input.GetKey("right")){
bracciaIniziali.SetActiveRecursively(true);
braccia2.SetActiveRecursively(false);
}
}