Unity3d An example of an enemy AI and animation (Animator) system

Source: Internet
Author: User

In this example, we are going to do some simple implementations of the enemy AI, where auto-follow and animations are the focus, and we want to achieve the following goals:

1. The enemy can automatically follow the protagonist

2. Enemy Model A total of four actions: idle (idle) run (run) Attack (attack) Death (death).

3. Ask the enemy to make the right moves at the right time

(i) Implementation of automatic follow-up

1) First, create a new scene with at least two characters in the scene: there is an enemy (blade skeleton) and a protagonist (yes, that's the capsule)

2) First select the scene model, and then in the Inspector window option Static next to the small triangle display drop-down menu, to determine where Navigation Static is selected. For model options unrelated to the scene terrain, make sure that it is not selected.

The options for the Navigation window are primarily to define the impact of the terrain on the seek path. Radius and height can be understood as the radius and altitude of the seeker. Max Slope is the maximum slope, which is beyond the path of the slope seeker. Step height is the maximum height of the staircase, which is beyond the height of the road seeker. The drop height indicates the height limit at which the seeker can jump. The jump Distance represents the jumping distance limit of the seeker. ---to be continued---

Unity3d An example of an enemy AI and animation (Animator) system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.