local SetAvoidanceInput = function(ai, input, args)
  if ai.SetAvoidanceInput then
    local Obstacle, Agent = input.Obstacle, input.Agent
    local AlwaysAvoid = args.AlwaysAvoid
    local GoalPosition = args.GoalPosition
    if Obstacle then
      Obstacle.Position = ai:GetWorldPosition()
      Obstacle.AlwaysAvoid = AlwaysAvoid
    end
    if Agent then
      Agent.Position = ai:GetWorldPosition()
      Agent.GoalPosition = GoalPosition
      Agent.AlwaysAvoid = AlwaysAvoid
    end
    ai:SetAvoidanceInput(input)
  end
end
return {SetAvoidanceInput = SetAvoidanceInput}
