блокировка камеры игрока, при открытии imgui окна

Ninthmoon

Известный
Автор темы
463
127
Версия MoonLoader
.026-beta
При открытии окна имгуи, появляется курсор и при движении им камера начинает крутиться и чем дальше от центра экрана тем быстрее)
imgui.ShowCursor = true, showCursor(true, true), imgui.LockPlayer = true, lockPlayerControl(true) - не помогает, персонажем управлять нельзя, но камера продолжает двигаться
одиночная игра
Lua:
local imgui = require 'imgui'
local key = require 'vkeys'

local main_window_state = imgui.ImBool(false)
function imgui.OnDrawFrame()
  if main_window_state.v then
    imgui.SetNextWindowSize(imgui.ImVec2(150, 200), imgui.Cond.FirstUseEver)
    imgui.ShowCursor = true
    imgui.LockPlayer = true
    lockPlayerControl(true)
    imgui.Begin('My window', main_window_state)
    imgui.Text('Hello world')
    imgui.End()
  end
end

function main()
  while true do
    wait(0)
    if wasKeyPressed(key.VK_Z) then
        main_window_state.v = not main_window_state.v
    end
    imgui.Process = main_window_state.v
  end
end
 

Hader

Потрачен
37
2
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
  • Нравится
Реакции: Lenny Scripts