Developer knowledge network · moderated exchange

UnreliableCode 커뮤니티

개발자 연구, 리버스 엔지니어링 및 코딩 커뮤니티

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개월 전 · 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개월 전 · 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개월 전 · 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.