Reading boneMatrix

Posts 1–2 of 2 · Page 1 of 1
Reading boneMatrix
Hi, im trying to make an external ESP, im using C#, SharpDX and ExternalUtilsCSharp, when i draw the boxes of the enemy players the boxes are rendered randomly on a fixed spots, idk what im doing wrong, here is my code:

my address is:

Code:
ViewMatrixAddress = BaseAddress + ViewMatrixOffset
BoneMatrixAddress = (BaseAddress + EntityListOffset + EntityNumber * 0x10) + BoneMatrixOffset
Im reading the view matrix like this:
Code:
matrix[0, 0] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 4, out ReadBytes), 0);
matrix[0, 1] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 8, out ReadBytes), 4);
matrix[0, 2] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 12, out ReadBytes), 8);
matrix[0, 3] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 16, out ReadBytes), 12);
matrix[1, 0] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 20, out ReadBytes), 16);
matrix[1, 1] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 24, out ReadBytes), 20);
matrix[1, 2] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 28, out ReadBytes), 24);
matrix[1, 3] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 32, out ReadBytes), 28);
matrix[2, 0] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 36, out ReadBytes), 32);
matrix[2, 1] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 40, out ReadBytes), 26);
matrix[2, 2] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 44, out ReadBytes), 40);
matrix[2, 3] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 48, out ReadBytes), 44);
matrix[3, 0] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 52, out ReadBytes), 48);
matrix[3, 1] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 56, out ReadBytes), 52);
matrix[3, 2] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 60, out ReadBytes), 56);
matrix[3, 3] = BitConverter.ToSingle(ReadMemory((IntPtr)ViewMatrixAddress , 64, out ReadBytes), 60);
And getting the head bone players positions like this:
Code:
Vector3.X = BitConverter.ToSingle(ReadMemory((IntPtr)(BoneMatrixAddress  + 0x30 * 8 + 0x0C), 4, out ReadyByted), 0);
Vector3.Y = BitConverter.ToSingle(ReadMemory((IntPtr)(BoneMatrixAddress  + 0x30 * 8 + 0x1C), 4, out ReadyByted), 0);
Vector3.Z = BitConverter.ToSingle(ReadMemory((IntPtr)(BoneMatrixAddress  + 0x30 * 8 + 0x2C), 4, out ReadyByted), 0);
Is this correct? idk if im reading the view matrix correctly becouse idk in which way are the values stored
And what im storing in vector3.x? another address pointing where the position of the bone is stored?
1st. part
PlayerAddress = read(BaseAddress + EntityListOffset + EntityNumber * 0x10)
BoneMatrixAddress = read(PlayerAddress + BoneMatrixOffset)

2nd. part needs big optimizations
Just read the 64 bytes once and then convert it to matrix.

3rd. part
looks fine
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us