
Originally Posted by
affe2626
m_vecViewOffset = 0x104;
That's the head offset from the player's origin, you know, a player can duck and shit like that.
Read a vector from player + 0x104 to get the head height and add that to your target's origin.
Code:
Vector GetHeadPosition()
{
return *reinterpret_cast<Vector*>(this + Offsets::m_vecOrigin) + *reinterpret_cast<Vector*>(this + Offsets::m_vecViewOffset);
}
I do however recommend that you use the bonematrix and read the location of bone 8 (head).
Many thanks, man...
edit : i think i did something wrong...
GetEyePosition is GetHeadPosition.
aimangle = CalcAngle(local->GetAbsOrigin(), eye);
eye = entity->GetAbsOrigin() + entity->GetEyePosition();
i did something like this and then
cmd->viewangles.x = aimangle.x;
cmd->viewangles.y = aimangle.y;
and its now shooting the middle of aim_botz xD not the 0,0,0 point on the map xD
any tips?