Introduction

It can let Character automatically follow nearby characters which is controlled by player.

Path Finding(Beta)

Our follower component can now perform some simple automatic pathfinding and won't get stuck by a simple wall like before. However, to use this feature, the following conditions must be met:

  1. Generate a navigation mesh in the world settings
  2. Enable automatic pathfinding in the follower component
  3. Ensure both the target and the follower are within the navigation mesh and there exists a traversable path

Tips:

  1. When setting up navigation mesh areas, ensure that the generation area covers objects that serve as paths or obstacles.

  2. The navigation mesh needs to be regenerated after each scene update

  3. You can duplicate areas to generate navigation meshes in multiple regions simultaneously. However, for best results, it's recommended to use a single dedicated area

  4. The total number of objects within all generation areas must not exceed 5000. Only use navigation meshes in areas where pathfinding is needed

  5. Try to limit generation areas to only cover necessary regions. For example, if you don't want objects to walk on rooftops, don't include rooftops in the generation area

  6. The current automatic pathfinding feature doesn't support dynamically changing scenes

    自动寻路.mp4

Properties

Property Type Description
Is Active Bool Whether the component is enabled
Active When Controlled Bool Whether the component takes effect when the character is controlled by the playerThe Is Active attribute is automatically modified only at birth and when controller is switched
Target Mode Enum The function mode of the Follow component:

Events

Event Description Parameter
When following starts Triggered when starting to follow a target 1.Object: the target to be followed. It represent the character when chasing a player
When reaching target Triggered when the distance to the target is less than the stopping distance 1.Object: the target to be followed. It represent the character when chasing a player
When target lost Triggered when target lost

Commands