I am working with a face where I would like to change expressions when a certain GUI button in pressed. I would want to just replace the fbx head model with a different fbx model that has a different expression. The list of buttons are emotions, such as happy, sad, angry ect. I have made the list of the buttons and the code is as follows.
function OnGUI () {
//background box
GUI.Box (Rect (10,130,100,90), "Expressions");
//Make first button
if (GUI.Button (Rect(20,160,80,20), "Nuetral")){ }
//Make second button if (GUI.Button (Rect(20,190,80,20), "Happy")){
}
//Make third button if (GUI.Button (Rect(20,220,80,20), "Angry")){
}
//Make fourth button if (GUI.Button (Rect(20,250,80,20), "Confused")){
}
}
In the assets I have labeled my fbx models ... neutralhead happyhead sadhead angryhead confusedhead
is there a script to add to my GUI button script to be able to switch to and from each model. Thanks.