How do you know PathfindingLogic calls UNavMovementComponent::RequestDirectMove

I understand when we use AAIController::MoveToActor(), the ‘PathfindingLogic’ runs, and UNavMovementComponent::RequestDirectMove will be called.

HOWEVER, How do you know about this flow exists !?

If I don’t understand this logic precisely, I can’t use in actual product development…

I looked up official DOC but I can’t find explanation about this.

1 Like

Through debugging you will find that MoveToActor will do a bunch of calculatiuons see if it’s possible to reach the actor and set a bunch of variables if it can.

In PathFollowingComponent’s tick function it uses the variables set in MoveToActor to determine whether how RequestDirectMove will be called or not.

1 Like

Ah, Tick function!

I found RequestDirectMove() is called in FollowPathSegment() which is called in TickComponent :point_down:

MovementComp->RequestDirectMove(MoveVelocity, bNotFollowingLastSegment);   

Thank you!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms