moveAlongNavMesh
moveAlongNavMesh(
step,entity,moveAlongNavMeshOptions):NavMeshMoveResult
Moves entity, a character no player controls, by velocity for
this tick along the world’s navmesh with no sweep, as Unreal’s
NavWalking and Unity’s NavMeshAgent.Move move one: a Detour step,
the height of the surface under it, and a push out of the characters
beside it, where it needs no physics. Answers no refusal where it
moved it, or why it did not, and then it stands where it was and the
caller moves it through moveCharacter: a push, the air, a moving
base, a dynamic body or a changed collider in its way, no navmesh under
it, or its movementMode set to Walking, as NavMeshMoveRefusal
lists. On the authoritative step alone, which the type holds.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
step |
AuthoritativeStep |
entity |
Entity |
moveAlongNavMeshOptions |
MoveAlongNavMeshOptions |
Returns
Section titled “Returns”Example
Section titled “Example”const { refusal } = moveAlongNavMesh(step, npc, { velocity }); if (refusal) moveCharacter(step, npc, { velocity });