setAngle

Vespan

i_hate_myself
Автор темы
Проверенный
1,684
877
Версия MoonLoader
.026-beta
Как поставить камеру игрока к координатам но что бы плавно было,не резко
 
Решение
Как вариант
Lua:
    local function setCum(pos2) -- by @oxexoexeo
        local function f(ang)
        if ang > math.pi then
            ang = ang - (math.pi * 2)
        elseif ang < -math.pi then
            ang = ang + (math.pi * 2)
        end
        return ang
        end
        local pos1 = {};
        pos1[1], pos1[2] = getCharCoordinates(PLAYER_PED);

        local vector = {pos1[1] - pos2[1], pos1[2] - pos2[2]};
        local ang = math.atan2(vector[2], vector[1]) + 0.04253;
        local vw = f(representIntAsFloat(readMemory(0xB6F258, 4, false)));
        local df = ang - vw;
        local smth = df / 7;
            
        setCameraPositionUnfixed(0, (vw + smth))
    end

madrasso

Известный
937
351
Как вариант
Lua:
    local function setCum(pos2) -- by @oxexoexeo
        local function f(ang)
        if ang > math.pi then
            ang = ang - (math.pi * 2)
        elseif ang < -math.pi then
            ang = ang + (math.pi * 2)
        end
        return ang
        end
        local pos1 = {};
        pos1[1], pos1[2] = getCharCoordinates(PLAYER_PED);

        local vector = {pos1[1] - pos2[1], pos1[2] - pos2[2]};
        local ang = math.atan2(vector[2], vector[1]) + 0.04253;
        local vw = f(representIntAsFloat(readMemory(0xB6F258, 4, false)));
        local df = ang - vw;
        local smth = df / 7;
            
        setCameraPositionUnfixed(0, (vw + smth))
    end
 
  • Нравится
Реакции: YarmaK

Похожие темы

    • Закрыта
    • Вопрос
    Ответы
    0
    Просмотры
    777
  1. Ответы
    1
    Просмотры
    238
  2. Ответы
    3
    Просмотры
    2K
    CLEO
    Удалённый пользователь 144706
    У