Relations NavMesh, MovementComponent, PathFollowingComponent of

 
 

Nvanas

NavMesh navigation grid, based on the underlying Recast Navigation, so this is actually the NavMesh Recast package.

NavMesh which contains a number of convex polygons, constructed primarily navmesh these processes produce polygons, polygons using these routing algorithm for pathfinding.

MovementComponent

MovementComponent moving assembly is responsible for transforming Actor, such as moving or rotating vector according to the input Actor. Input can come from player input, can also come from other places.

MovementComponent multiple sub-categories, such as PawnMovementComponent, CharacterMovementComponent, WheeledVehicleMovementComponent, ProjectileMovementComponent and so on.

In these subclasses, CharacterMovementComponent is the most complete and most complex support network synchronization and forecasting to support a variety of mobile mode, support for animation and collision and so on, up to 10,000 single file multiple lines of code. As more internal processing in something, in case there are multiple Character, CharacterMovementComponent components often take up more CPU time.

PathFollowingComponent

PathFollowingComponent is pathfinding component responsible for pathfinding, by moving the input vector to MovementComponent, moving along a preset route to the destination.

In PathFollowingComponent has two main implementations UE4 and UPathFollowingComponent UCrowdFollowingComponent, in addition to a UGridPathFollowingComponent, seemingly less common.

Character UPathFollowingComponent be mainly used for pathfinding, point moves along the path. UCrowdFollowingComponent mainly for the case where a plurality of Character, can deal with issues between the escape Character. Instead of using UCrowdFollowingComponent path points, but the use of the polygon NavMesh, treated with CrowdManager Character plurality of motion.

Usually after the move command issued, such as MoveTo, first of all queries NavMesh, generate a path, and then issue MoveRequest to PathFollowingComponent, PathFollowingComponent then use MovementComponent moves follow the path input.

Guess you like

Origin www.cnblogs.com/haisong1991/p/11448970.html