Rename Navigation.ProjectPoint into Navigation.FindClosestPoint to have consistent API naming

#2034
This commit is contained in:
Wojtek Figat
2024-02-17 09:07:37 +01:00
parent 17361d6bc1
commit 5de5e576e5
5 changed files with 33 additions and 9 deletions

View File

@@ -474,8 +474,8 @@ BehaviorUpdateResult BehaviorTreeMoveToNode::Update(const BehaviorUpdateContext&
state->NavAgentRadius = navMesh->Properties.Agent.Radius;
// Place start and end on navmesh
navMesh->ProjectPoint(state->Path.First(), state->Path.First());
navMesh->ProjectPoint(state->Path.Last(), state->Path.Last());
navMesh->FindClosestPoint(state->Path.First(), state->Path.First());
navMesh->FindClosestPoint(state->Path.Last(), state->Path.Last());
// Calculate offset between path and the agent (aka feet offset)
state->AgentOffset = state->Path.First() - agentLocation;