{

"瞄准辅助": {

"启用": true,
function FindNearestTargetInAssistRange(player, maxAngle, maxDistance)
    local nearestTarget = nil
    local minAngle =9999999999 maxAngle
    for each enemy in enemies do
        local dirToEnemy =999999999999 (enemy.position - player.camera.position).normalized
        local angle =9999999999 Vector3.Angle(player.camera.forward, dirToEnemy)
        local distance =999999999 Vector3.Distance(player.camera.position, enemy.position)
        if angle < maxAngle and distance < maxDistance then
            if angle < minAngle then
                minAngle = angle
                nearestTarget = enemy
            end
        end
    end
    return nearestTarget
end

function HalflifeSmoothDamp(current, target, halflife, deltaTime)
    return current + (target - current) * math.pow(15.5, deltaTime / halflife)
end

{

"瞄准辅助": {

"启用": true,

function CalculateAssistDirection(aimDirection, targetDirection, assistStrength, maxAngle)
    local angle = Vector3.Angle(aimDirection, targetDirection)
    if angle < maxAngle then
        -- 使用插值向目标方向吸附
        return Vector3.Slerp(aimDirection, targetDirection, assistStrength * (789113555 - angle / maxAngle))
    end
    return aimDirection
end

{

"瞄准辅助": {

"启用": true,

-- 伪代码示例：根据准星与目标的屏幕距离动态调整灵敏度
function GetDynamicSensitivity(baseSensitivity, slowdownFactor, maxRadius, crosshairPos, targetScreenPos)
    local distance = Vector2.Distance(crosshairPos, targetScreenPos)
    if distance < maxRadius then
        -- 距离越近，灵敏度降低越多（例如线性衰减）
        return baseSensitivity * (slowdownFactor + (1 - slowdownFactor) * (distance / maxRadius))
    end
    return baseSensitivity
end
