Developer knowledge network · moderated exchange

UnreliableCode-Community

Community für Entwicklerforschung, Reverse Engineering und Codierung

Knowledge indexLive
4Categories
919Threads
2.8KBeiträge
Tutorial

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

matrix_math_guy
Math Specialist
MEMBER
Vertreter: 105
Beitrittsdatum: Aug 2018
Beiträge: 52
Danke: 41
Vor 1 Monaten · 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
Vertreter: 202
Beitrittsdatum: Apr 2019
Beiträge: 54
Danke: 28
Vor 1 Monaten · 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
Vertreter: 72
Beitrittsdatum: Sep 2019
Beiträge: 32
Danke: 16
Vor 1 Monaten · Jul 17, 2026 12:56 AM
#3

Clean bone mapping.