There's more...

You can also use Animation Curves to scale the collider. To do so, create the Animation Curve and an Animator Controller parameter with the same name as the curve has. Get the value of the parameter in scripts by calling the animator.GetFloat("ParameterName") function, where animator is the variable that holds reference to the Animator component and ParameterName is your parameter (and curve) name. Next, use the value to scale the collider. This way you can create single animations with changing collider size. A good example of such an animation would be a roll.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.60.249