1. Download and install the Rain plugin
It could have been downloaded to Unity's asset Stroe, but now rain's development company has invested in the development of AI, so the rain plugin is under the rack.
So I'm giving you a link to the net.
Link: https://share.weiyun.com/5BKFvOn Password: wsikw8
Please contact me if the link expires.
2. Move to the specified target
After importing you can see that RAIN is already on the top of the
Create a floor and an AI object
Select the AI object you want to manipulate and create an AI child object
We can see that the AI has such a component from the object
The parameters are as follows:
AI: The name of the current rain controller
Body: The object under control
Mind: The way of thinking (free version only basicmind)
Behavior tree: The Behavior trees used
Open Behavior Editor: Opening the Behavior Tree edit window
3. Let the object reach the point we specify
We open the Behavior Tree Edit window
Behavior Tree: The current behavior trees
Let's first create a behavior tree (click the box, choose Create), give the Behavior tree a name (note that you cannot enter Chinese)
Rain will create 1 root default nodes for us (default is seq[execution of their child nodes in turn), do not understand the query behavior tree node type
Create a child node of a move
We find that we are missing a mobile target
Create a navigation target
Modify the navigation target name to tar1
We can click this button to make the TAR1 settle on plan.
Set goals on the behavior tree (note: Be sure to + "")
Face target is the orientation.
Specify the behavior tree used for AI objects
Click to run, we see slowly moving to the target point, and the following behavior tree, color from the running (yellow) to run successfully (green)
3. Move along the specified path
Create Route Path
Click Add New route on the created Route object and rename the waypoint route object to route.
Create a behavior Tree
Note the 2 contents of my box, I means the iteration variable (the current route point)
Set the corresponding target in the move node
Because I set the pingpong movement so I go back and forth.
4. Intelligent obstacle Avoidance
We put an obstacle in the middle and we find it penetrates directly, which is not the effect we want.
Create a navigation grid so that it can wrap the scene we need to calculate.
Click Create Grid
After the operation, it is found that the barrier has been more perfect to bypass.
Hope this tutorial is helpful to you, thank you!
Unity Rain Ai Plug-in basic use (i)