Developer knowledge network · moderated exchange

مجتمع الكود غير الموثوق به

أبحاث المطورين، مجتمع الهندسة العكسية والترميز

Knowledge indexيعيش
4Categories
919Threads
2.8Kدعامات
Tutorial

ESP 3D Bounding Box rendering using GET_PED_BONE_COORDS natives

imgui_artisan
UI Designer
MEMBER
مندوب: 202
تاريخ الانضمام: Apr 2019
دعامات: 54
شكرًا: 28
1 months ago · Jul 18, 2026 2:50 PM
#1

Rendering bone-accurate 2D/3D boxes over GTA V peds:

CPP
// Retrieve bone 3D world coordinates
Vector3 headPos = PED::GET_PED_BONE_COORDS(ped, SKEL_Head, 0.0f, 0.0f, 0.0f);
Vector3 feetPos = PED::GET_PED_BONE_COORDS(ped, SKEL_L_Foot, 0.0f, 0.0f, 0.0f);

Vector2 screenHead, screenFeet;
if (WorldToScreen(headPos, screenHead) && WorldToScreen(feetPos, screenFeet)) {
    float boxHeight = screenFeet.y - screenHead.y;
    float boxWidth = boxHeight * 0.55f;
    
    ImGui::GetWindowDrawList()->AddRect(
        ImVec2(screenHead.x - boxWidth / 2.0f, screenHead.y - 10.0f),
        ImVec2(screenHead.x + boxWidth / 2.0f, screenFeet.y),
        IM_COL32(0, 255, 128, 255),
        3.0f // Corner rounding
    );
}
fivem_native_guru
CitizenFX Dev
MEMBER
مندوب: 182
تاريخ الانضمام: May 2021
دعامات: 8
شكرًا: 69
1 months ago · Jul 18, 2026 9:19 PM
#2

Using SKEL_Head (0x796E) and SKEL_L_Foot (0x3779) produces dynamic bounding boxes that scale perfectly when players crouch or sit in vehicles.

matrix_math_guy
Math Specialist
MEMBER
مندوب: 105
تاريخ الانضمام: Aug 2018
دعامات: 52
شكرًا: 41
1 months ago · Jul 19, 2026 2:55 PM
#3

Clean rendering code. Corner rounding in ImGui looks very modern.