Post by archieandrews on Jul 16, 2019 11:48:51 GMT
I'm struggling ot make my character smoothly transition from a Talking state back to Locomotion Idle State.
I have a state machine under Locomotion Named Talking that contains an Talking Idle Motion. This transition works via a "talking" bool parameter.
On the transitions to and from Talking I have Exit Time disabled.
However the character snaps between animations rather than a smooth blend (maybe I need a blendtree?)
Can you please explain how to make the transition smooth? I don't mean the time it takes but the actual transition so it happens smoothly from Talking animation back to the Free Locomotion default idle animation to the other.
Like witcher said, one way of doing is using the substate Actions and call your animation using this line instead of enabling/disable a bool
// the float value is the transition duration animator.CrossFadeInFixedTime(yourAnimationClip, 0.5f);
If you open the vGenericAnimation script used in the video tutorial you post, you will see that we used this line to trigger the animation, you could use animator.Play as well but we prefer to use CrossFadeInFixedTime
You can use the bool "Talking" as a condition to exit or use the ActionState which we use to handle generic actions such as this
By doing this you're making generic transitions between submachine states instead of a specific state to a blendtree, which may not generate the best result
Post by archieandrews on Jul 16, 2019 20:02:52 GMT
Thank you very much both of you. That sorted it!
I wasn't exactly sure how to access the invector 3rd person stuff but used the lines below. Its the whole tpInput.cc.animator .. etc etc that confuses me. Ironically the stuff I was aksing for and would like to see is simple example script documents of. ie. this does this .. this does that. But anyway learned it now so Thanks very much.