
Originally Posted by
viking911
That's weird. Share the aimthread (You can send me pm if youre afraid)
Could u go to skype please?
- - - Updated - - -
So the problem is if someone is not in my fov or some shit it shoots a bit off his head like 1 head away any thoughts anyone? calcangle is fine and fov calc too
- - - Updated - - -
cmd->viewangles.x = Angle.x;
cmd->viewangles.y = Angle.y - 0.3f;
decreasing aim angle.y a little bit works a bit better now but still not perfect ( and also probably a shit way lol but it works better than before )
- - - Updated - - -
found out another thing the inaccuracy of the cmd viewangles is based on distance, weird that engine angles are fine tho
- - - Updated - - -
anyone have an idea how to fix? The inaccuracy increases with distance, it goes little bit to left
there is calcangle i use
I dont think if it is because of CalcAngle but including it just in case something is wrong with it
Code:
void CalcAngle( Vector& vecOrigin, Vector& vecOther, Vector& vecAngles )
{
Vector vecDelta = Vector((vecOrigin[0] - vecOther[0]), (vecOrigin[1] - vecOther[1]), (vecOrigin[2] - vecOther[2]));
float hyp = sqrtf(vecDelta[0] * vecDelta[0] + vecDelta[1] * vecDelta[1]);
vecAngles[0] = (float)atan(vecDelta[2] / hyp) * (float)(180.f / M_PI);
vecAngles[1] = (float)atan(vecDelta[1] / vecDelta[0]) * (float)(180.f / M_PI);
vecAngles[2] = (float)0.f;
if (vecDelta[0] >= 0.f)
vecAngles[1] += 180.f;
vecAngles[2] = 0.f;
}