Developer knowledge network · moderated exchange

Сообщество UnreliableCode

Сообщество разработчиков, обратного проектирования и кодирования

Tutorial

Deriving 3D Pedestrian Bounding Boxes using ENTITY::GET_ENTITY_BONE_COORDS [v2.4 Technical Discussion]

matrix_math_guy
Math Specialist
MEMBER
Представитель: 105
Дата присоединения: Aug 2018
Сообщения: 52
Спасибо: 41
1 месяцев назад · Jul 16, 2026 6:31 AM
#1

Rendering oriented 3D bounding boxes on GTA V ped models:

CPP
void DrawPedBox3D(Ped ped, ImU32 color, const Matrix4x4& vMatrix) {
    Vector3 head = GetPedBoneCoords(ped, 31086); // SKEL_Head
    Vector3 lFoot = GetPedBoneCoords(ped, 63931); // SKEL_L_Foot
    Vector3 rFoot = GetPedBoneCoords(ped, 52301); // SKEL_R_Foot
    Vector3 feet = (lFoot + rFoot) * 0.5f;
    
    float height = head.z - feet.z + 0.35f;
    float width = 0.65f;
    
    DrawOriented3DBox(feet, width, height, GetEntityHeading(ped), color, vMatrix);
}
imgui_artisan
UI Designer
MEMBER
Представитель: 202
Дата присоединения: Apr 2019
Сообщения: 54
Спасибо: 28
1 месяцев назад · Jul 16, 2026 12:30 PM
#2

Averaging Left and Right foot bone coordinates ensures the box sits perfectly on the floor regardless of running animations.

raycast_ryan
Ballistics Dev
MEMBER
Представитель: 72
Дата присоединения: Sep 2019
Сообщения: 32
Спасибо: 16
1 месяцев назад · Jul 17, 2026 12:56 AM
#3

Clean bone mapping.