In a previous post I had mentioned Playmaker (a popular visual scripting addon for Unity), and wondered whether it could be used to control a CrazyTalk character.... There are no custom Playmaker actions for CrazyTalk of course, but I got it to work, so I'm sharing here in case anyone else uses Playmaker, or wants to build a CrazyTalk "game" but is as intimidated by scripting as I am.
Very simply, I added a Playmaker FSM (Function State Machine) to my CrazyTalk character (inside the CTRoot folder).
In the start state, I used PLAY ANIMATION and assigned the idle animation to my character. The FINISHED transition loops back into itself so when the idle animation ends it will play again.
I have an event called "speak" which transitions to a second FSM. The PLAY ANIMATION action wouldn't play the CT audio, so I used PLAY SOUND and found the audio file within Unity's assets. The animation and audio play simultaneously. When FINISHED they transition back to the start state, and the idle plays again....
For a test scene I set up a separate FSM on an unseen cube trigger and positioned it "behind" the character's head. The FSM waits for a mouseclick, checks to see if you clicked within the trigger area, and then sends the "speak" event to the character's FSM. You can try the results here:
http://www.3d.wetcircuit.com/Unity3D/HiThere/HiThere.htmlThat's it. You could setup any number of "events" that transition to each of the character's animations... No scripting involved!
Edited
9 Years Ago by
Holly Wetcircuit