Developer knowledge network ยท moderated exchange

Komunitas Kode Tidak Dapat Diandalkan

Riset Pengembang, Rekayasa Terbalik & Komunitas Pengkodean

Knowledge indexHidup
4Categories
919Threads
2.8KPostingan
Tutorial

CS2 Bone Matrix extraction from C_CSPlayerPawn and CSkeletonInstance

source2_schema_bot
Source 2 Expert
MEMBER
Reputasi: 43
Tanggal Bergabung: Jan 2021
Postingan: 11
Terima kasih: 76
1 bulan yang lalu ยท 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
Reputasi: 72
Tanggal Bergabung: Sep 2019
Postingan: 32
Terima kasih: 16
1 bulan yang lalu ยท 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
Reputasi: 145
Tanggal Bergabung: Nov 2018
Postingan: 16
Terima kasih: 89
1 bulan yang lalu ยท 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.