Forum rules - please read before posting.

Phenome Int + Blendtree

Hey Chris, 

I've recently been trying to get speech animation working for my character using Unity Sprites Complex mode. 

I notice you drive a 'Phenome int'. Similar to the Direction int however, I cannot drive any parameter in a blend tree with it. Blend tree's only seems to want floats. I get 'Phenome is the wrong type' and other errors. If I change your source code to drive a float for Phenomes it works.

Is there a reason you chose to drive Phenomes and Direction with ints? Is this a Unity bug or am I missing some workflow that makes this work properly as is?

Do you have any advice for how this should be set up? I know there are a million ways it could be set up, but maybe you could point out how you might use the Phenome int. 



Comments

  • Phonemes are driven with integers because they will never be non-whole numbers.  If you want to convert it to a float, you could create both types in your Animator controller, and then write a custom script that simply reads the value of the integer parameter and writes it to the float by a simple conversion:

    myFloatValue = (float) myIntegerValue;
  • Thanks Chris.

    What about my other questions though? If we need an additional script to use the Phoneme int, why isn't that just part of AC? Did you intend for people to write additional scripts to use this feature?

    Again, I'd love to see an example of how you used this or how you would use it. 
  • The intention was for the phoneme parameter to be wired up as part of a standard Animator layer, not within a blend tree.  Unless you go down the blend tree route, you'd have no need for such a script.  Perhaps it was short-sighted on my part to not consider the use of blendtrees for this particular feature, though this is the first time someone has suggested using it for that purpose.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.