Skip to content

Hud Manager

Getting Current Cursor Position

INFO

This function returns the position in 3D world coordinates

math::vector3 g_sdk->hud_manager->get_cursor_position()

Example
cpp
void __fastcall draw_world()
{
    auto cursor_position = g_sdk->hud_manager->get_cursor_position();
    g_sdk->renderer->add_circle_3d( cursor_position, 50.f, 1.f, 0xFFFFFFFF );
}
void __fastcall draw_world()
{
    auto cursor_position = g_sdk->hud_manager->get_cursor_position();
    g_sdk->renderer->add_circle_3d( cursor_position, 50.f, 1.f, 0xFFFFFFFF );
}

Getting Currently Hovered Target

INFO

This function returns the currently hovered target

game_object* g_sdk->hud_manager->get_hovered_target()

Example
cpp
void __fastcall game_update()
{
    auto target = g_sdk->hud_manager->get_hovered_target();
    if ( target && target->is_hero() )
    {
        g_sdk->log_console( "[+] Currently hovering %s", target->get_char_name().c_str() );
    }
}
void __fastcall game_update()
{
    auto target = g_sdk->hud_manager->get_hovered_target();
    if ( target && target->is_hero() )
    {
        g_sdk->log_console( "[+] Currently hovering %s", target->get_char_name().c_str() );
    }
}