xhookLua
Game

Smooth aim

Ease the view toward the aimbot's target with a spring.

local spring = util.spring_damper(150, 18)

callbacks.register("on_create_move", function(cmd)
    local ent, hitbox, point = aimbot.target("legit")
    local me = engine.local_player()
    if not ent or not me then spring:reset() return end

    local want = (point - me:eye_position()):to_angles()
    local turn = spring:step(want - cmd.viewangles, engine.frame_time())
    cmd.viewangles = cmd.viewangles + turn
end)
Smooth aim ยท Lua API ยท xhook