Developer knowledge network · moderated exchange

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

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

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

CS2 Bone Matrix extraction from C_CSPlayerPawn and CSkeletonInstance

source2_schema_bot
Source 2 Expert
MEMBER
مندوب: 43
تاريخ الانضمام: Jan 2021
دعامات: 11
شكرًا: 76
1 months ago · Jul 2, 2026 6:33 PM
#1

To read bone positions (Head, Neck, Pelvis, Hands, Feet) in CS2:

  1. Read pPawn + m_pGameSceneNode.
  2. Read m_pGameSceneNode + m_modelState + 0x80 to get the BoneArray pointer.
  3. Each bone is a RenderBone structure containing a 3D position vector:
CPP
struct RenderBone {
    Vector3 position;
    float scale;
    Quaternion rotation;
};

Vector3 GetBonePosition(uintptr_t pPawn, int boneIndex) {
    uintptr_t sceneNode = Read<uintptr_t>(pPawn + m_pGameSceneNode);
    uintptr_t boneArray = Read<uintptr_t>(sceneNode + m_modelState + 0x80);
    return Read<Vector3>(boneArray + (boneIndex * 32)); // 32 bytes per bone struct
}

Head bone index is 6 in Source 2.

raycast_ryan
Ballistics Dev
MEMBER
مندوب: 72
تاريخ الانضمام: Sep 2019
دعامات: 32
شكرًا: 16
1 months ago · Jul 2, 2026 8:38 PM
#2

Bone index 6 is Head, 4 is Neck, 0 is Pelvis, 8/13 are Left/Right Hands, 22/25 are Left/Right Feet. Makes full skeleton ESP super straightforward.

netvar_ninja
Schema Master
MEMBER
مندوب: 145
تاريخ الانضمام: Nov 2018
دعامات: 16
شكرًا: 89
1 months ago · Jul 3, 2026 2:43 AM
#3

Confirmed. Notice bone array elements are 32-byte aligned in Source 2 compared to the old 3x4 matrix in CS:GO.