Hey Community,
I have now successfully reversed the bone-positions by the sdk of css.
Now I have only one problem left and thats howto calculate the Angle to aim at them.
If you see this function (credtis to Fleep) it calculates the target angle for an basic
aimbot with the feed-position of the local player and the feed-position of the entity which is targeted and ends by aiming at the head.
Logicaly it aims to high if I put instead of the feed-position of the entity which is targeted at dst the bone-position eg the head.
So does anyone here has a good Idea, Solution for calcing the angle correctly for me and/or other people which have the same problem ?
And just by the way, what does this 57.... mean exactly to understand it better ?
,greetings GAFO :thinking: :icon16:
I have now successfully reversed the bone-positions by the sdk of css.
Now I have only one problem left and thats howto calculate the Angle to aim at them.
If you see this function (credtis to Fleep) it calculates the target angle for an basic
aimbot with the feed-position of the local player and the feed-position of the entity which is targeted and ends by aiming at the head.
Code:
void CalcAngle( float *src, float *dst, float *angles )
{
double delta[3] = { (src[0]-dst[0]), (src[1]-dst[1]), (src[2]-dst[2]) };
double hyp = sqrt(delta[0]*delta[0] + delta[1]*delta[1]);
angles[0] = (float) (asinf(delta[2]/hyp) * 57.295779513082f);
angles[1] = (float) (atanf(delta[1]/delta[0]) * 57.295779513082f);
angles[2] = 0.0f;
if(delta[0] >= 0.0)
{
angles[1] += 180.0f;
}
}So does anyone here has a good Idea, Solution for calcing the angle correctly for me and/or other people which have the same problem ?
And just by the way, what does this 57.... mean exactly to understand it better ?
,greetings GAFO :thinking: :icon16:
Aucun commentaire:
Enregistrer un commentaire