How it works...

This recipe uses a very simple, yet powerful concept. The only additional thing we do here is triggering the Dodge animation. This animation uses root motion and translates our Spider character. Our Humanoid character uses the Attack Animation Event and the TargetTrigger to check if an enemy is in its attack range (see the Using Animation Events to trigger script functions recipe for details). If our Spider leaves the TargetTrigger before the Attack event occurs, it will avoid being hit.

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

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